MySQL is an open-source, relational database management system. Place you question on MySQL Spatial Extensions here.

learn more… | top users | synonyms

20
votes
4answers
2k views

Would PostGIS offer an advantage over MySQL for a produce farm application?

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 ...
10
votes
2answers
7k views

Data types for storing lng/lat in MySQL

I'm storing a large list of lnt/lat points in a MySQL database. At the moment these are projected points for the UK in M, but in the long term I would like to make sure that I can store the ...
7
votes
3answers
2k views

how to find 20 closest points efficiently

Say I want to find 20 closest business near me. My table structure is like this: BusinessID varchar(250) utf8_unicode_ci No None Browse distinct values Change Drop ...
7
votes
5answers
8k views

How to Geocode 300,000 addresses on the fly?

I have a database which has 300,000 address, which are to be shown on map. I know if I geo-code all the address it will be too expensive for me. So I was wondering if it is possible to geo-code the ...
7
votes
3answers
3k views

Poor Performance when using Spatial Indexes in MySQL

Re-post of a question asked on Stack Overflow when it was suggested this would be a better forum. I'm trying a little experiment at pushing a data set which is not geo-spatial but fits it quite well ...
7
votes
1answer
234 views

What constitutes a valid spatial layer when connecting QGIS to MySQL?

I'm trying to work with a MySQL 5.5 table using QGIS 1.8. I can do "Add Vector Layer", choose "Database", and successfully connect to the MySQL connection I previously set up. QGIS shows me a ...
6
votes
2answers
509 views

Comparing TIGERLine 2006 (and prior) With New Shapefile Format

I have created a geo database using MySQL and the TIGERLine data files available from the US Census. This is actually an MSSQL database I created that I've transfered to MySQL. Everything works ...
6
votes
1answer
279 views

Trigger geocoding without having to visit page

I'm using Google's geocoder to store results in database then display them on a map on another page. The problem is that each company profile page needs to be visited before it's geocoded. Is there a ...
5
votes
3answers
10k views

Find points within a distance using MySQL

I have a mySQL table with user name, latitude and longitude of the user. I would like to get a list of user who are inside the circle or square of a given latitude and longitude with given distance. ...
5
votes
3answers
243 views

Should We Be Using a GIS?

I'm actually a graphic designer - the manufacturing company I work for wants to develop a map with layers for Regional Sales Managers territories, Internal Sales Associates territories, Local Rep ...
5
votes
1answer
623 views

Calculating distance in WGS84 (MySQL and Geoserver)

Here is the environment in which I work: An application using geo-referenced data Database MySQL 5.5, storing georeferenced points A Geoserver server, connected to the MySQL database Here is the ...
4
votes
2answers
589 views

Which spatial DBMS should I select?

I found there are a number of RDMS have the spatial capability e.g. mysql, postgreSQL I considering which I should go forward! I would like to store the lat lon coord from the tracker to the db ...
4
votes
3answers
2k views

MySQL to GeoJSON - Formatting Issue

I'm trying to make a select on a mysql table and then write it out to a geojson file. I'm getting close but there are a few issues. Here's what I have so far: <?php require("dbinfo.php"); // ...
4
votes
1answer
4k views

Convert Shapefile to MySql

I have used Grass GIS imported a .shp file; I now want to export this file to MySQL. I understood that MySQL will contain the function of all three the files necessary in a Shape file system (.shp - ...
4
votes
1answer
251 views

How to join MySQL data with GIS data using arcpy?

Here is my problem, I have a MySQL database with table in it that has 4 columns: ID, Owner, Address, Legal. And I also have an ArcGIS GDB that has a parcel layer that has in it a PID field. I am ...
4
votes
1answer
832 views

Best GeoDjango MySQL workaround for distance queries

I'm using mysql 5.1.50, so the distance QuerySet method is not available to me. Here is my model: class Location(models.Model): name = models.CharField(max_length='100') point = ...
4
votes
1answer
10k views

Drawing polyline that grows as the car moves by taking data from MySql and PHP in Google API

I wanted to show the polyline on google Map as car moves with animation (like in this site: http://econym.org.uk/gmap/example_cartrip2.htm) by taking data from MySQL and PHP. For that i refered the ...
3
votes
3answers
2k views

mysql database of bars, pubs and restaurants in the united states and maybe canada

I am mostly seeking Bars and Pubs but Restaurants are a very nice bonus. I need a database with zipcode, city, state, longitude, latitude, establishment name, establishment contact information, maybe ...
3
votes
3answers
2k views

Moving from MapInfo to web mapping

I use MapInfo and have a lot of data in .tab format that I would like to put into a database in order to access it through a website. I would like to continue using MapInfo as my GIS programme and ...
3
votes
1answer
3k views

Establishing a MySQL connection in ArcGIS 10

Is it possible to create a connection to a MySQL database in ArcGIS 10?
3
votes
1answer
566 views

Does MySQL only support bounding boxes calculations instead of the real polygon geometry?

Within our company we are deciding which DBMS we will use to store spatial data. IT wants MySQL with the Spatial extension because there is already knowledge about handling MySQL DB. We are doing ...
3
votes
1answer
970 views

Loading Tiger 2010 Edge Shape File w/ ogr2ogr Produces Reversed Latitude and Longitude

I'm attempting to build a MySQL database that will allow me to reverse geo-code addresses using the MBR functions within MySQL. I've downloaded the latest set (2010) of TIGER edge shape files from ...
3
votes
2answers
957 views

How did QGIS fix a shapefile's character encoding, and can I do this on the command line with ogr2ogr?

Solved: I'm not sure why, but it works fine if I specify --config SHAPE_ENCODING "ISO-8859-1" in my ogr2ogr command. For whatever reason, this allowed ogr2ogr to go from the original TigerLine ...
3
votes
2answers
359 views

CartoDB - update existing table from external data (i.e. Mysql database)

I would like my CartoDB data to be updated, using external data (mysql database, I run and manage locally using php scripts), so that the CartDB table gets updated with the most recent data, whenever ...
3
votes
1answer
150 views

Why can't I edit polygons once they have been saved to MySQL?

I have a simple table with an id field and a polygon field in mySql. Using QGIS I can add new polygons and give them an id. Before saving them I can also edit them. But once a polygon has been saved ...
3
votes
1answer
349 views

Why is GeoNetwork not displaying any maps?

I've just installed GeoNetwork 2.6.4 on CentOS 6.2 using MySQL as the database backend. Now, when I go to the web interface, I see the main web site, but no maps are displayed. On the geonetwork ...
3
votes
0answers
299 views

Problem connecting QGIS to MySQL [closed]

I'm trying to create a new vector layer and store it in a MySql-database, but when I test the connection I get an error with no detailed information at all. If I give an erroneus password I get a ...
2
votes
1answer
269 views

PostgreSQL, find points near points

I'm going to have a database with a 'people' table and a 'shops' table. I'd like to find all people within 500m of a shop, and details from both tables. I'm used to working with mySQL, but I'm ...
2
votes
1answer
421 views

Reverse Geocoding - calculate every time, or store result in database?

Several questions, such as this one, discuss whether to store only lat/long in the database & calculate the street address every time it is needed, but they seem to miss a few points & seem to ...
2
votes
1answer
3k views

How to add polygon in MySQL database

I have a table which contains an field zoneShape of the type Polygon. When inserting some geometry in this field, in phpmyadmin it says: affected 1 row. The row is added, but the geometry field says ...
2
votes
1answer
3k views

Import MySQL Spatial vector layer in QGIS

I have a spatial table called 'places' in MySQL, with a spatial column 'pt' (point). I tried to import it in QGIS and no points appear. I created a view 'places_as_text' which reproduces the table but ...
2
votes
1answer
866 views

QGIS 2.0 without MySQL connector

On a mac (Mountain Lion), after a major upgrade to GDAL (1.10) and related frameworks from KyngChaos page, QGIS 2.0 doesn't show any MySQL connector: Add Vector > Database > ... The driver ...
2
votes
1answer
732 views

MySQL GeoSpatial function for ST_Distance_Spheroid? Metric used in return Type of GLength?

Is there a ST_Distance_Sphere, ST_Distance_Spheroid equivalent function in MySQL's GeoSpatial Support? If not, any way to emulate this? What is the metric used in return type of ...
2
votes
3answers
950 views

Accessing coordinates of polygon

I have designed a polygon in a web page and the coordinates are stored in the database of the type polygon. However when I check the database, I find GEOMETRY - 120B under polygon field. What does ...
2
votes
2answers
527 views

MySQL with geoserver

I am storing all my features in mysql db and I am getting them with ajax and adding to the openlayers map. Now I have to many features and it's taking a lot of time to get all of them and adding them, ...
2
votes
1answer
159 views

Fast zipcode detection from latitude/longitude

I need a way to get the zipcode of a lat/long pair fast (<10 ms), and at a high rate (thousands of qps) I've loaded a shapefile from the US Census Bureau into a mysql database with spatial ...
2
votes
1answer
277 views

How to do Reverse Geocoding from MySQL/PostGIS Sql ???

I want to do reverse geocoding from MySQL or PostGIS SQL. I have shapefile up to town level of India. So I have a geometry boundary for each town. What I want is to first find the nearest point ...
2
votes
2answers
463 views

Map Coordinates to Neighborhoods from MySQL Table

I have a MySQL database with a set of coordinates and a shape file (Zillow Neighborhood Database for Chicago) containing the boundaries for each neighborhood which I have converted to a spatial ...
2
votes
1answer
2k views

How to calculate distance between two locations using stored procedure in MySQL?

I have a database with locations with its lat and long coordinates. The area of locations is quite small with lots of them quite near each other. Im using this stored procedure in my project. ...
2
votes
1answer
71 views

How to use GDAL to import lat/lon points from ESRI File Geodatabas into MySQL

I have a file geodatabase from here: ftp://ftp.csc.noaa.gov/temp/MarineCadastre/AIS.SampleData.zip Using ogrinfo, I can see that it contains a layer called "Broadcast_" that has lat/lon points: ...
2
votes
2answers
1k views

Drop Markers and MarkerCluster together from database

I've been working on my map which gets it's details from a MySQL database. I use MarkerCluster Plus to cluster my markers but would like to add the drop animation to it. I found this thread, but ...
2
votes
1answer
539 views

How to speed up this simple MySQL points in the box query

MySQL doesn't have nearest neighbor search so. So I try to come up with a "distance" that's reasonable so the number of returned query is around 20-200. That way innodb doesn't have to compute ...
2
votes
2answers
801 views

MySQL Query to fetch all cities and POI's near the route

I'm implementing alghorithm to search POI near the route (array of Lat, Long points). My problem is that I don't know how to calculate distance beetween line segment and POI. Look at picture that I ...
2
votes
1answer
211 views

Large loads geojson from mysql to leaflet?

I have a mysql database with +25K rows including geometry and other attributes. Using a mysql2geojson php script I then added it to a leaflet map. It is super slow now, what can I do to boost the ...
2
votes
0answers
196 views

Plotting X, Y coordinates generated from MySQL database in QGIS

Currently running QGIS 1.8.0 on Mac OS X 10.8.4. I can plot points on a map using the "Add delimited text layer" plugin to get x-y coordinates from a text file. However, I'd like to be able to ...
2
votes
0answers
161 views

How can I improve my Ray casting algorithm?

I have been using the following function below which have been working well to decide if a point in the polygon but once I have many points which is building the polygon say over few thousand it seems ...
2
votes
0answers
236 views

Different results given by PostGIS and MySQL?

I'm developing a spatial database of administrative areas. I started out with PostGIS, but as MySQL is being used in our other projects, I thought I would at least try to create a spatial-enabled ...
2
votes
0answers
322 views

How to access mysql data from python built-in console?

I'm writing a QGIS Plugin, and somewhere I want to present data from a MySQL database. It's simple data(strings,etc), not Geospatial, or vector data. I'm familiar with querying databases from python ...
2
votes
0answers
140 views

How to populate ESRI GeoPortal programmatically?

I'm trying to find either some documentation or an example of how to manually populate the GeoPortal metadata datastore. I'm using a MySQL backend. Given a ISO XML file I can manually harvest it but ...
1
vote
3answers
389 views

Simple WMS server

Is there a way to implement a WMS server using only php or python cgi and mysql? I can't use geoserver or mapserver and postgres and any other software as they are not provided by the administrator.