Spectrum Spatial (SSA/LIM)

 View Only
  • 1.  Geopackage Information

    Posted 05-01-2020 02:50
    Just looking if anyone is using geopackages with Spectrum spatial.
    I have been attempting to get it working but am having some issues.
    I can connect to the gpkg, and the driver is working ok say's connected ok, but when I try to view or create a table it throws a blank error and fails, I can see the table, I can see the fields in the table it shows them ok but will not show the data.
    Using 12.2 at present.
    Appreciate any advice or assistance thanks.

    ------------------------------
    Russell Ferguson
    GIS and IS Coordinator
    Ararat Rural City Council
    Ararat VIC
    ------------------------------


  • 2.  RE: Geopackage Information

    Posted 05-04-2020 19:18
    Hi Russell,

    I just tested it in Spectrum Spatial 2019.1 (SO9) and it works ok for me.

    How are you connecting to the GPKG? I used a file system connection (the same one I use for .TAB) and opened the .GPKG file directly.

    ------------------------------
    Duri Bradshaw
    Spatial IT Consultant
    Insight GIS
    ------------------------------



  • 3.  RE: Geopackage Information

    Posted 05-04-2020 23:25
    Thank you for the reply, I had not tried a file connection, but I set up a java connection and have now got it working.
    Does SSA follow the settings from the geopackage for layer styles and visibility. It seemed like it didn't for me just wondering if yours did.
    I have not done a lot with geopackages just trying to see what works and what doesn't.
    It seems like mapinfo doesn't follow the layer settings either unless I have got something wrong.

    ------------------------------
    Russell Ferguson
    GIS and IS Coordinator
    Ararat Rural City Council
    Ararat VIC
    ------------------------------



  • 4.  RE: Geopackage Information

    Posted 05-05-2020 02:08
    Edited by Duri Bradshaw 05-05-2020 02:08
    I think you will find most GIS packages do styling in a completely different way so is quite rare that styles will translate from one vendor format to another.

    I know that if you save a Native TAB to GPKG in MapInfo the DefaultStyles and DefaultThemes will be transferred to the new .TAB that is associated with the GPKG but the style is not stored in the GPKG itself, my understanding is the Geopackage spec does not include any styling.

    So in Spectrum it may be possible to open the .TAB and inherit the DefaultStyle or DefaultThemes but if I was you I would open the GoePackage in MapInfo, apply a style override or theme and user the MapUploader to upload your map to Spectrum as this will give you control over style as well as zoom layering and labelling.

    ------------------------------
    Duri Bradshaw
    Spatial IT Consultant
    Insight GIS
    ------------------------------



  • 5.  RE: Geopackage Information

    Posted 05-05-2020 02:23
    Thanks once again Duri, that's pretty much what I was thinking.
    I thought I better ask before I get too deep into it,
    I am using a sqlite database that the geopackage is stored in. I have been using QGIS 3.xx.x for the project, and reads the geopackage fine, and if I change styles or layer visibility, it will ask if I want to write the changes to the database, if I say yes it seems to work ok.

    I was hoping that mapinfo and spectrum could do the same thing, hahaha, but that would make it to damn easy wouldn't it. 
    Thanks again.


    ------------------------------
    Russell Ferguson
    GIS and IS Coordinator
    Ararat Rural City Council
    Ararat VIC
    ------------------------------



  • 6.  RE: Geopackage Information

    Posted 06-11-2020 19:52
    Adding this here as it is in the same vein.

    When I have a layer from a geopackage in my workspace where the .tab reference and the gpkg file are both in the same folder and there is a spectrum connection to the folder - I get a "Table not Found" error when using mapuploader.

    This only happens for GPKG based layers and not for native tab files in the same folder.

    Do you have to create a new link to each GPKG in the repository?

    I am using Spectrum/SSA and Mapinfo 19 -everything is fully patched/current.




    ------------------------------
    George Corea
    Mangoesmapping
    ------------------------------



  • 7.  RE: Geopackage Information

    Posted 06-11-2020 22:56
    George,
    If the .tab file used in MapInfo Pro is not there you get no error? If so where do you see this error? I have seen cases where the spectrum log file logs errors as it is scanning a folder but I have not seen an actual error that showed up in the mapuploader or creating the named table in Spatial.  If that is happening, it should be looked into. I can try but not until tomorrow (last gasps before bed).
    As to the SQLite issue,  I would have to say that this is not a true geopackage. An OGC spec geopackage, which we support, uses a SQLite db but inside it is a very specific set of metadata that storage of the WKB that makes it a geopackage. You access the tables in that package via a fill connection, not a database connection.
    If you are doing that, I would guess that there is java driver for the SQLite (maybe even spatial lite) but we would never read the geometry from such a table. At least that is my experience.  ​

    ------------------------------
    Eric Blasenheim
    Spectrum Spatial Technical Product Manager
    Troy, NY
    ------------------------------



  • 8.  RE: Geopackage Information

    Posted 06-12-2020 00:56
    Thanks Eric,

    To clarify...

    I have a gpkg file that has a single polygon layer.

    When I open the GPKG in Mapinfo it creates a reference tab file (similar to when we open a .ecw and db connection where there is no .dat, .map etc) and then tried to use mapuploader to add it to spectrum.

    At this point I get the "Table not found" error.

    The .tab and .gpkg are in the same folder as other 'real' tab files that are in the same folder, so the spectrum link is correct and works.

    So -do we have to create a spectrum link to each gpkg we want to use or is it enough for the gpkg to be in a folder that's linked? if it's the latter then what changes do I need to make? I would prefer to use Mapuloader so that it's easier to apply symbology/labelling etc.

    !table
    !version 1520
    !charset UTF-16

    Definition Table
    Type GPKG
    begin_metadata
    "\Geopackage" = ""
    "\Geopackage\DatabasePath" = "CCRC_Demographic.gpkg"
    "\Geopackage\TableName" = "CCRC_Demographic"
    "\Geopackage\DefaultStyle" = "Pen (1,2,0) Brush (2,16777215,16777215) "
    "\Geopackage\ConvertUnsupportedObjects" = "TRUE"
    "\IsReadOnly" = "FALSE"
    "\DefaultStyles" = ""
    "\DefaultStyles\Pen" = ""
    "\DefaultStyles\Pen\LineWidth" = "1"
    "\DefaultStyles\Pen\LineStyle" = "0"
    "\DefaultStyles\Pen\Color" = "0"
    "\DefaultStyles\Pen\Pattern" = "2"
    "\DefaultStyles\Brush" = ""
    "\DefaultStyles\Brush\Pattern" = "2"
    "\DefaultStyles\Brush\Forecolor" = "16777215"
    "\DefaultStyles\Brush\Backcolor" = "16777215"
    "\DefaultStyles\Brush\Transparent" = "FALSE"
    "\MapInfo" = ""
    "\MapInfo\TableID" = "8ddd8f93-74ef-4f67-b2bd-0f7b1aec3f12"
    "\DefaultTheme" = ""
    "\DefaultTheme\Expression" = ""
    "\DefaultTheme\Expression\IsSimpleCol" = ""
    "\DefaultTheme\ThemeType" = ""
    "\DefaultTheme\Apply" = ""
    "\DefaultTheme\AutoSpreadWhat" = ""
    "\DefaultTheme\ObjectType" = ""
    "\DefaultTheme\Ranges" = ""
    "\DefaultTheme\Ranges\ModelRangeBrush" = ""
    "\DefaultTheme\Bins" = ""
    "\DefaultTheme\Bins\Count" = ""
    "\DefaultTheme\Bins\Bin" = ""
    "\DefaultTheme\Bins\Bin\1" = ""
    "\DefaultTheme\Bins\Bin\1\From" = ""
    "\DefaultTheme\Bins\Bin\1\To" = ""
    "\DefaultTheme\Bins\Bin\1\BinBrush" = ""
    "\DefaultTheme\Bins\Bin\1\BinBorderPen" = ""
    "\DefaultTheme\Bins\Bin\2" = ""
    "\DefaultTheme\Bins\Bin\2\From" = ""
    "\DefaultTheme\Bins\Bin\2\To" = ""
    "\DefaultTheme\Bins\Bin\2\BinBrush" = ""
    "\DefaultTheme\Bins\Bin\2\BinBorderPen" = ""
    "\DefaultTheme\Bins\Bin\3" = ""
    "\DefaultTheme\Bins\Bin\3\From" = ""
    "\DefaultTheme\Bins\Bin\3\To" = ""
    "\DefaultTheme\Bins\Bin\3\BinBrush" = ""
    "\DefaultTheme\Bins\Bin\3\BinBorderPen" = ""
    "\DefaultTheme\Bins\Bin\4" = ""
    "\DefaultTheme\Bins\Bin\4\From" = ""
    "\DefaultTheme\Bins\Bin\4\To" = ""
    "\DefaultTheme\Bins\Bin\4\BinBrush" = ""
    "\DefaultTheme\Bins\Bin\4\BinBorderPen" = ""
    "\DefaultTheme\Bins\Bin\5" = ""
    "\DefaultTheme\Bins\Bin\5\From" = ""
    "\DefaultTheme\Bins\Bin\5\To" = ""
    "\DefaultTheme\Bins\Bin\5\BinBrush" = ""
    "\DefaultTheme\Bins\Bin\5\BinBorderPen" = ""
    "\DefaultTheme\Bins\Bin\6" = ""
    "\DefaultTheme\Bins\Bin\6\From" = ""
    "\DefaultTheme\Bins\Bin\6\To" = ""
    "\DefaultTheme\Bins\Bin\6\BinBrush" = ""
    "\DefaultTheme\Bins\Bin\6\BinBorderPen" = ""
    "\DefaultTheme\DefaultBrush" = ""
    "\DefaultTheme\DefaultBorderPen" = ""
    end_metadata


    ------------------------------
    George Corea
    Mangoesmapping
    ------------------------------



  • 9.  RE: Geopackage Information

    Posted 06-12-2020 01:11
    Hi George,

    It works for me in 2019.1
    !table
    !version 1520
    !charset UTF-16
    
    Definition Table
      Type GPKG
    begin_metadata
    "\Geopackage" = ""
    "\Geopackage\DatabasePath" = "Footpath2.gpkg"
    "\Geopackage\TableName" = "footpath"
    "\Geopackage\ConvertUnsupportedObjects" = "TRUE"
    "\IsReadOnly" = "FALSE"
    "\DefaultStyles" = ""
    ......
    "\DefaultStyles\Font\Opaque" = "FALSE"
    "\MapInfo" = ""
    "\MapInfo\TableID" = "714d37cc-089a-4450-9a18-449e89244154"
    end_metadata​

    Can you try adding the NamedTable via Spatial Manager to confirm that Spectrum can read the GPKG


    ------------------------------
    Duri Bradshaw
    Spatial IT Consultant
    Insight GIS
    ------------------------------



  • 10.  RE: Geopackage Information

    Posted 06-12-2020 14:31
    I just tried this and after messing around, I did reproduce something here.  I use the uploader from a client machine. That is, not from MapInfo Pro installed on the server, where it might not be. Mostly I do this because I want to ​make sure that this mode is working. Many of our customers are on Linux or who have restricted environments so the map uploader has to be run from a different machine without direct access to the files on server. Any new file based data has to be "installed" (copied) to an appropriate place on the server. Sometimes this process is done by IT and not the GIS knowledgeable admin.
    I have not found any issues with geopackage or other data such as you found.
    However, I have an instance on a VM where I have Pro and I decided to create a new geopackage table and use the uploader on the server. As this requires that the table be open in MapInfo Pro it is possible that the Spatial server code will try to access the geopackage when there is a lock on the geopackage. In the server log file, I saw an error:
    Caused by: java.sql.SQLException: [SQLITE_BUSY]  The database file is locked (database is locked)
    The uploader tells Spatial that it is looking for a table (the name of the actual table inside geopackage) that is contained in a specifically named geopackage. The server tries to find that geopackage and then via SQL Lite, ask for the table names in it to see if one matches.
    If this fails, then that is not the right geopackage. In this case the failure is not because the name is wrong but rather we cannot access the names of the tables.
    Exactly when the table is locked by Pro or other software is hard to know, but if Pro is pointing to the exact same package as the server, the chances of this happening are increased. 
    The error message, I grant you, could be better.






    ------------------------------
    Eric Blasenheim
    Spectrum Spatial Technical Product Manager
    Troy, NY
    ------------------------------