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
------------------------------
Original Message:
Sent: 06-11-2020 22:56
From: Eric Blasenheim
Subject: Geopackage Information
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
Original Message:
Sent: 06-11-2020 19:52
From: George Corea
Subject: Geopackage Information
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
Original Message:
Sent: 05-05-2020 02:23
From: Russell Ferguson
Subject: Geopackage Information
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
Original Message:
Sent: 05-05-2020 02:07
From: Duri Bradshaw
Subject: Geopackage Information
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
Original Message:
Sent: 05-04-2020 23:25
From: Russell Ferguson
Subject: Geopackage Information
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
Original Message:
Sent: 05-04-2020 19:18
From: Duri Bradshaw
Subject: Geopackage Information
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
Original Message:
Sent: 05-01-2020 02:50
From: Russell Ferguson
Subject: Geopackage Information
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
------------------------------