13

I am trying to figure out if there are other viable exchange formats for spatially enabled data. So far, it seems SpatiaLite is the only one out there, but it has yet to be adopted by the industry.

GuidoS
  • 1,174
  • 5
  • 16
  • 32
  • Are you looking for an exchange format or a portable storage format? It would help to describe the problem you're trying to solve. GML is a great exchange format but you wouldn't use it as a datastore for a web app. – Sean Apr 05 '11 at 19:05

7 Answers7

10

In terms of OGC Simple Feature SQL specifications, Spatialite is the only open source implementation on a single file basics. For this reason (and others!) it has major benefits compared to other flat vectorial formats like shapefile etc...

Being fully supported by GDAL as an "official" OGR driver [0], this is a warranty for future support of major GIS Desktop software (they all use the universal GDAL).

Currently only QGIS is able to read (and write) it, so if you want an exchange format directly readable/writable from your software without exports to other formats maybe it is still not your best option, if you are not using QGIS.

If you need an exchange forma though, as already suggested, you can use a whatever supported format from GDAL/OGR [0] and then import back to a spatial db.

Note that if Spatialite will implement topology, as I have heard, it will be have a major benefit compared to other plan formats (like shapefiles for example).

[0] https://gdal.org/ogr/drv_sqlite.html

[1] https://gdal.org/drivers/vector/index.html

Glorfindel
  • 1,096
  • 2
  • 9
  • 14
capooti
  • 2,698
  • 21
  • 22
  • I have heard rumblings that spatialite is still a moving target and development on is slow and that is why I am wondering if there are any other options out there. – GuidoS Apr 05 '11 at 16:48
  • 1
    As for development speed, I would characterize it as frenetic, not slow. I would say that SpatiaLite is somewhat of a moving target because it still relatively young. The SQL is quite standards compliant, so query code won't change much. Version 2.4 is almost final, but isn't, as you suggest, compatible with the 2.3 client libraries. – DavidF Apr 05 '11 at 20:20
  • So, how does the change from 2.3 to 2.4 effect the end user? If my current way to access it is through ogr do you think I will even know the difference? – GuidoS Apr 06 '11 at 14:57
5

It really depends of your needs. I also think geojson, gml, citygml, and the google kml could also be considered as spatially exchange formats.

PolyGeo
  • 65,136
  • 29
  • 109
  • 338
simo
  • 8,580
  • 1
  • 28
  • 56
  • I am looking for something that can be used to replace shape files and that is sql querable. I think sqlite is a great platform but have heard some rumblings about the spatialite community and am wondering if there are other solutions out there right now. – GuidoS Apr 05 '11 at 13:58
  • The problem is that for something to be natively SQL queryable it must be specific to a particular database. And with OGR everything is SQL queryable in some form. – Matthew Snape Apr 05 '11 at 14:25
  • 1
    As shapefile substitution format, indeed, I read that spatialite is good candidate. I never heard about other formats for that. – simo Apr 05 '11 at 14:43
  • I think it's great that this exchange format is built ontop of a heavily used sql format. sqlite is super... but is spatialite the only one out there using it? – GuidoS Apr 05 '11 at 16:50
  • It sounds like you are looking for SpatiaLite, but only if it isn't SpatiaLite. I am curious what your bias is. (Maybe you already answered it in your comment below.) – DavidF Apr 05 '11 at 20:22
  • In the end I am trying to figure out if there are any alternative, I think highly of spatialite, but want to make sure it's the best option. – GuidoS Apr 06 '11 at 14:55
2

For what its worth, my vote goes to Spatialite as the single file solution, exchangeable with everyone. Esri personal geodatabases (.mdb) are great but don't work with a lot of GIS system stacks, primarily those that are Linux based, because the file format requires proprietary Microsoft database drivers that are unavailable to many. The other single file remedies offer unique crutches to get your data from various places--online services, GPS devices etc. (KML, GPX) ..or from other GIS users who have collected data to share with you in shapefile format. dxf and dwg and other CAD formats don't offer the functionality GIS users expect. Ofcourse, if you are placing your data on a server to be fed out to many, then you don't need a single file format. PostGIS would be the non-file database (server) solution.

user12711
  • 1,620
  • 3
  • 16
  • 26
2

Although it lacks support outside of ESRI, Personal Geodatabase would be a good choice, and has industry adoption. In terms of adoption AutoCAD formats could also be considered.

Matthew Snape
  • 6,127
  • 2
  • 27
  • 48
2

I think that the snag is when you say, 'adopted by the industry'. There is value for the large proprietary GIS software companies to control the data format.

SpatiaLite works great with QGIS. You can build map layers based on SQL queries.

If you want to combine spatial features and related tables all in a single file for exchanging, SpatiaLite is great. If you just want to exchange features with attributes, a zipped shapefile is still your best bet.

DavidF
  • 4,862
  • 1
  • 26
  • 32
  • I want to move away from shapefiles for many reaons, including: it requires multiple files, it has field naming limitations, it only allows for one feature layer/class, it does not allow for direct sql queries – GuidoS Apr 05 '11 at 16:46
  • I don't think that many of us would mind moving away from shapefiles. RE SQL Queries, is it the file format that doesn't allow direct SQL queries or is it the software that you are using that doesn't allow direct SQL queries? – DavidF Apr 05 '11 at 17:24
  • 1
    It's more about having a robost standard that would allow you to use other tools to access your data through sql queries, hence the sqlite. – GuidoS Apr 05 '11 at 18:34
1

Now OGC GeoPackage is the spatial database for vector features and raster tiles standard. However, you can't do spatial operations/functions/queries on gpkg. You can create a virtualgpkg in spatialite and use spatialite for those spatial operations.

0

SQLite itself is somewhat spatial. OGR support writing to it. Besides SpatiaLite (which is poorly supported) there is Autodesk's SDF format. The latest versions are actually SQLite files.

http://en.wikipedia.org/wiki/Spatial_data_file

James Fee
  • 870
  • 4
  • 8
  • 1
    With GDAL v >1.7.0, Spatialite is fairly well supported. http://www.gdal.org/ogr/drv_sqlite.html You can read/write. Spatial indexes are not supported, but if the question is about only exchanging data, that shouldn't be a huge deal. – DavidF Apr 05 '11 at 16:05
  • Yea see that's my beef. For a true interchange/exchange file format, it needs to be read natively by the most popular desktop and server applications. While I have no problems rolling out OGR myself, my customers would never even know to do that. – James Fee Apr 05 '11 at 16:13
  • I would like to point out that this question is directly related to a session that James had at WhereCamp PDX. His theory was that we don't need a exchange format and the only way to have a new exchange format would be to get said format adopted by major vendors. – GuidoS Apr 05 '11 at 16:40
  • @James - Then the file geodatabase it is! ; / GIS industry=ESRI, right? They released the API. Throw in some 'layer packages' for the icing on the cake... – DavidF Apr 05 '11 at 17:20
  • 1
    The FGDB has all the same problems as the SpatiaLite format, but for the opposite reason. The library only works on Windows and a couple "proprietary" Linux systems (RHEL, SuSE). – James Fee Apr 05 '11 at 21:00
  • So.. does anyone use SDF? Do people use it in AutoCAD? Is SDF editable in autoCAD natively? I found that DWG with object data was the best native solution on AutoCAD. – GuidoS Apr 06 '11 at 14:58
  • From what I've heard, Autodesk is adding SDF compatibility to Autocad to hold database info. DWG isn't going anywhere, but SDF should eventually replace everything else. – James Fee Apr 06 '11 at 19:58