开发者

how to store spatial files in MySQL

what开发者_高级运维 is a better way to store spatial data in MySQL (say tracks) internally or as references to the external flat files?


MySQL has a spatial extensions to store geographic objects (objects with a geometric attributes). More detail available there.


I would reccomend against mysql if you want to store it as explicitly spatial information. Instead I would reccomend Postgresql/PostGIS if you want to stay with Open Source DB. MySQL barely implements any of their spatial functionality. If you read the doc closely most spatial functions are yet to be implemented.

If you are don't care about explicitly spatial information then go ahead and store it directly in the DB.

If you give some more background on what you want to do we might be able to help more


The "better way" to store data depends on several factors which you, yourself need to consider:

  • Are the files rediculously large? +50MB? MySql can time out on long transactions.

  • Are you working on a closed network environment where the file system is secure and controlled?

  • Do you plan only to serve the raw files? There's no point in processing them into MySql format only to re-process them on the way out.

  • Is it expected that 'non technical' people are going to want to access this data? 'non technical' people generally don't like obfuscated information.

  • Do you have the capability in your applciation (if you have an applicaiton) to read the spatial data in the format that MySql stores it in? There's no point in processing and storing a .gpx or .shp file into MySql format if you can't read it back from there.

  • Do you have a system / service that will control the addition / removal / modification of the file structure and corresponding database records? Keeping a database and file system in sync is not an easy task. Especially when you consider the involvement of 'non technical' people.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜