How do I design a database for storing GPX tracks and supporting spatial queries?

المشرف العام

Administrator
طاقم الإدارة
I have a series of GPX files that contain 1...n tracks. Each track contains roughly 5k - 10k points. The GPX files do not contain waypoints or routes.

I want to design a database with the following requirements: a) store the raw, unprocessed GPX data for archival purposes, b) support spatial queries to return tracks and / or trackpoints based distance within a specified lat/lon, and c) support reporting details (lat/lon, timestamp, etc) of the points in the resultset of the spatial query.

Designing a "typical", non-spatial database design with SQL Server I would look at storing the track metadata in a table and storing trackpoints in their own table with a reference to the track table. The original GPX files could be stored outside the database in a file (filestream) or in a table as, probably, varchar or ??? depending on performance of proof of concept.

How should I design this database, considering spatial queries is a significant portion of the requirements?



أكثر...
 
أعلى