I am working on software that is very ESRI oriented, but a future version will likely not be using ESRI software. It uses Shapefiles and Geodatabases. I'm planning on getting all of my data to Shapefiles in anticipation for future versions of the software that will likely be on Android and other mobile devices. It appears that Shapefiles are the most common datatype for features in the open-source GIS world, but what are the others, and what benefits do they bring? I'm familiar with GeoJSON and KML, but I'm sure there are others.
I would like to know all options, but I am particularly interested in dataset types best suited for storing on mobile devices (the data must be accessible without an internet connection).
Answer
As @user890 says, this very much depends on how the data will be used. Mainly there are two ways you could access the data:
- By loading it all into memory in one go and then access/query the data in-memory.
- By querying for specific features, bounding boxes etc.
Formats like GeoJSON and KML are best suited for cases when you want to load everything in one go. The benefits are that the data can be structured in a way that's more suited for your application. The downsides: larger file sizes (since they are text-based) and the inability to do efficient querying directly from the file.
SQLite/Spatialite is better for querying (SQL), but it's more difficult to structure the data - you have to flatten everything into database tables and then do JOINs (which can be expensive) when querying.
There isn't really a perfect file format that will cover all (but then again shapefiles are far, far from perfect). One alternative to consider is rolling your own application-specific format, but this only works if you don't need to share the data with the outside world.
No comments:
Post a Comment