Spatialite data layers in Map3D

Spatialite data layers in Map3D

Anonymous
Not applicable
1,885 Views
5 Replies
Message 1 of 6

Spatialite data layers in Map3D

Anonymous
Not applicable

I have a GIS datbase built in Spatialite and I am trying to import those features into Map3D and Civil3D. I know I can export them to something else but I would really like to find away to connect to the data. I know I can make a custom FDO connection, is there directions on how to make one for a spatialite database built in other GIS systems? The Database I have works in QGIS, ArcGIS, SAGA, and many others it just doesn't work in Map/Civil3D. I also tried building the database using Map3D but then I get the exact opposite issue, it cannot be opened by any of the other tools we have.

Thanks for the help;

Tyler

0 Likes
1,886 Views
5 Replies
Replies (5)
Message 2 of 6

Anonymous
Not applicable

Hi Tyler,

 

Map / FDO sqlite (spatial) and sqlite (spatial) are not the same and incompatible.

I read somewhere what exactly the issue is (as far as I remember it is down to a few bytes which have different meaning in both formats and therefore create the issue) but I couldnt find it anymore.

 

Anyway - I havent tried but you could check whether the FDO GDAL/OGR  provider is able to read "native" sqlite-spatial files. I also found a post where someone describes how to copy from one to the other respectively. 

 

Here are a few links:

 

http://gdal.org/drv_sqlite.html

https://www.gaia-gis.it/fossil/spatialite_gui/index - can read native and FDO spatialite files

https://gis.stackexchange.com/questions/78172/how-do-i-use-the-natural-earth-sqlite-db-with-qgis 

 

Rob

0 Likes
Message 3 of 6

Anonymous
Not applicable

Anyway to use the FDO/OGR connection or modify it for the datastructure? It seems to me the sqlite database connection in AutoCAD is assuming the database is structured in a certain way, if I could get it look at the database differently it might work.

 

0 Likes
Message 4 of 6

Anonymous
Not applicable

Hi,

 

I found an earlier discussion with some details about the nature of the differences between FDO and non-FDO spatialite files:

 

https://forums.autodesk.com/t5/autocad-map-3d-forum/fdo-sqlite-fgf-wkb-geometry-format-issues-for-qu...

 

Rob

0 Likes
Message 5 of 6

Anonymous
Not applicable

Hi CWSU,

 

I've had the same issue using SpatialLite (referred to as SL from now on) files in Map.

 

The main difference between SLs produced with other applications and FDO provider SLs (the type ACAD Map uses) is that the FDO provider adds additional class and attribute metadata to the SL-s and places them into separate tables. That includes the definitions of columns in the database, constraints, spatial contexts and so on.

 

When you connect to SLs with Map, it won't work unless these metadata tables are present. However trying to manually add these is not a pleasant workflow and takes quite some time and research, so I'd suggest a workaround:

 

For opening data with Map from other sources:

- In QGIS, you can export any vector based layer to SHP, which FDO (and ACAD Map) can read, write and import without a problem, because it doesn't require the additional metadata in that format.

 

For producing GIS data with Map to be opened with another application:

- Same here, export an SHP file with Map (or more, since the old school shape format can only contain 1 feature class) and you'll be able to read it with other applications.

 

Just a remark: It's also possible that geometries are represented in a different way in FDO SLs, haven't tested that

 

Hope that'll help, good luck, GG

0 Likes
Message 6 of 6

Anonymous
Not applicable

Sorry for the delay I was away at conference where this topic and the OSGeo and OpenGEO were discussed at length. It seems this is a road block for others as well.

Importing and Exporting is the solution I am using currently but what I want is one repository accessible by our Esri/QGIS users and AutoCAD. Since our consultants and contractors use autoCAD and we use a myraid of GIS applications. I want to be able to provide the repository and not be bothered with constant exporting. On top of that I also do not have the funds to setup an MSSQL/Oracle based Server to handle it so I was looking into the opensource realm. 

If I have time later in the day, or week, I will go through some of those links to see if I cannot sort a solution.

Tyler

0 Likes