[GIS] Would PostGIS offer an advantage over MySQL for a produce farm application

mysql-spatialpostgis

I have a web app that stores the locations of farms in West Michigan. You can search for a product (e.g. "broccoli") and it will show you all the farms that grow that product.

Right now I'm using MySQL and using trigonometry to calculate the difference between the user's location and the location of each farm. It's not a bad way to go but it did take some doing.

Another thing I want to do soon is to map out growing seasons for different products for different regions. (For example, I want to show that avocados grow at a certain time of year in California but never Ohio.)

I realize this is an open-ended and possibly naive question, but might it be worth it for me to make the switch to PostgreSQL/PostGIS to take advantage of its spatial capabilities?

Best Answer

I am a great PostGIS fan and have no experience with MySQL so I mght be biased.

But from what you write I think of two reasons to switch.

first, it will most surely be much easier to implement new features like the season map you mentioned.

second, when you today do your trigonometry calculations I guess you are doing it outside the db. if you do all that in the db instead you are much more free in your development of the overlaying applications.

you will probably not have to do any calculating outside the db if you run postgis.

the season thing you mentioned might be doable in MySQL to since it sounds very basic but you will get mmore flexibility in PostGIS with access to all spatial functionality.

/Nicklas