Questions tagged [mysql]

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

Filter by
Sorted by
Tagged with
1 vote
0 answers
693 views

GeoTools: SimpleFeatureCollection to KML error CoordinateReferenceSystem

I want to export a SimpleFeatureCollection (Read from a MySQL DB) to a KML file, here is my code used to read the infos into the console: private void featureCollectionToKML(SimpleFeatureCollection ...
Felix's user avatar
  • 41
3 votes
1 answer
3k 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 doesn't ...
Pankus's user avatar
  • 328
0 votes
1 answer
1k views

PHP/MySQL, PostgreSQL spatial queries. Find a polygon that contains a coordinate? [closed]

I am building a non mapping javascript app and I am wanting to take a lat/long coordinate and query a MySQL table of polygons for the one that contains the point. I have looked into MySQL spatial ...
ezekielweb's user avatar
2 votes
1 answer
1k 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 ...
Adrian Mester's user avatar
1 vote
0 answers
919 views

Problem importing ESRI shapefile information to MySQL

I recently updated to Qgis 2.0 and therefore the "exporttomysql" plugin does not work anymore. What I want to do is exporting the geometry information of a shapefile(Polygon) into a MySQL database. I ...
user2386786's user avatar
2 votes
1 answer
1k views

How to set style in the database

Is it possible to set style layers in the database? (QGIS) [MySQL database] I would like to set and share my style with other users, so when they open the layer it's still as my style.
Seren's user avatar
  • 321
1 vote
0 answers
536 views

ogr2gr loading spatial data into mysql

I am trying to load shapefile into mysql (MYISAM) using ogr2ogr and i get an error that says failed to fetch the requested layer. What could be wrong with my statement is it the issue with quotes or ...
kartoza-geek's user avatar
  • 1,161
1 vote
1 answer
686 views

Getting centroid of closed line in MYSQL

I have a table that contains only closed lines (lines where endpoint is the same as startpoint). I would need to find a centroid for those lines. How would I be able to achieve it? It does not ...
Matej's user avatar
  • 295
1 vote
2 answers
1k views

Postgis csv and error loading into mysql

I want to load spatial data into MySQL using a CSV I have generated from a Postgres table and when loading it into MySQL database using phpmyadmin it complains "Cannot get geometry object from data ...
kartoza-geek's user avatar
  • 1,161
1 vote
2 answers
408 views

Mysql to nosql. Best solution?

We are working on our new vehicle tracking system. We have been making use of mySQL for the past two years. However we have been discussing moving to a noSQL database. We have a high number of reads ...
c.bartolo's user avatar
1 vote
1 answer
1k views

Error during conversion of shapefile to MySQL using ogr2ogr

I have installed MS4W in Windows 7. I get an error when I try to convert a shapefile to MySQL database using GDAL/OGR ogr2ogr. This is the command I'm trying: C:\ms4w\tools\gdal-ogr>ogr2ogr -f ...
Wahyu's user avatar
  • 11
2 votes
2 answers
2k views

How does MYSQL accept the WKT representation of a polygon with holes?

I have a set of coordinates that creates a polygon with holes in it. I'm using qgis with mmqgis to extract. How does MYSQL accept the WKT representation of a polygon with holes? By holes I mean ...
user2355051's user avatar
1 vote
1 answer
3k views

How do I write a MYSQL spatial query to find all polygons (rectangle) that contain any points in a table?

Something like: SELECT * from polygons WHERE bounds CONTAINS(SELECT geom_point from points) Can someone help me out with the syntax? Bounds will always be a rectangular polygon and everything is in ...
Chris's user avatar
  • 65
5 votes
2 answers
336 views

Should We Be Using a GIS? [closed]

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 ...
user19960's user avatar
  • 107
4 votes
2 answers
4k 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 ...
user1718097's user avatar
1 vote
0 answers
2k views

Convert a decimal degree to meters from the MySQL Spatial GLength

The MySQL Spatial function GLength returns the distance between two points, this distance is in the same unit from the projection. Since I'm using the WGS84 (SRID:4326) the answer will be with ...
F.Norte's user avatar
  • 61
2 votes
0 answers
2k views

Check if a point is near a linestring with MySQL Spatial Extension (untrustable)

I have to discover if a given point is at least 500 meters (ou other distance) from a route line that exist in my database recorded using the MySQL Spatial. I see there is no similar function in ...
F.Norte's user avatar
  • 61
3 votes
1 answer
3k views

Finding points near points using PostgreSQL?

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 getting ...
Gregory's user avatar
  • 392
1 vote
2 answers
934 views

Geoserver - Key Authentication against a MySql Database

I am trying to implement a token based security scheme with Geoserver. What we need to do is send the client a license key when they log into our primary application. This license key is generated by ...
Mark Cupitt's user avatar
  • 3,854
0 votes
1 answer
257 views

Creating an Address Locator with a Database of Geo Information

I am trying to build an Address Locator for ArcGIS 10.1. I would like to use a Microsoft Server MySQL database where location information is stored using an alias, an address, and XY coordinates. What ...
Dan's user avatar
  • 1
1 vote
0 answers
159 views

Solve Mysql Spatial error

Converting shp2mysql will leads an null value in geom filed. how to rectify the the problem. shp2mysql -s 32643 landuse landuse LIS >landuse.sql
vibin's user avatar
  • 125
1 vote
1 answer
1k views

How to add MS SQL table using python console?

I have MS SQL Server 2008 R2 database. How to add MS SQL Table using python console in QGIS?
Mari's user avatar
  • 11
2 votes
0 answers
101 views

how to use ArcGIS cloud hosted map with custom data from mysql

I have map hosted on ArcGIS.com which I can use and embed in my webpage. I have few tables with latitude-longitude in mysql. is there anyway I can add it as marker overlay layer on map taken from ...
apaleja's user avatar
  • 405
1 vote
0 answers
401 views

Improving 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 ...
biz14's user avatar
  • 193
1 vote
1 answer
206 views

Check Personal Geodatabase attribute against external MySQL database?

I have a Personal Geodatabase to which editors enter values from some field inputs. I would like some of the entries, eg Project No ( whose name is unique and has some some related attributes like ...
Adarsh Madhavan's user avatar
1 vote
1 answer
562 views

Converting Heatmap into Grid of Points to regenerate less accurate Heatmap?

Question: How do you take a heatmap generated using a GIS software (arcgis, qgis...) and convert it into a uniform grid array of points which can be used to regenerate the heatmap (although with ...
Nyxynyx's user avatar
  • 1,657
0 votes
1 answer
934 views

How to export Spatial data from MsSQL to MySQL using OpenSource/Free tools

I have a few tables with geometry fields in MsSQL Server 2008. I would like to export the whole table with data to MsSQL Server. Are there any open source/free tools that does this job?
vinayan's user avatar
  • 7,242
2 votes
2 answers
19k views

Geocoding addresses from MySQL and adding them like markers to Google map [closed]

I'm using Google Maps API and Google Geocoding for geocoding addresses. I have table named 'users' and column named 'location' in MySQL database. Column 'location' contains addresses. I need to ...
againstflow's user avatar
  • 4,988
4 votes
1 answer
737 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 ...
Michal Zimmermann's user avatar
5 votes
1 answer
2k 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 ...
nicolasca's user avatar
1 vote
1 answer
2k views

How to connect to MySQL from QGIS in Ubuntu10?

I have just installed Quantum GIS 1.8.0 on my Ubuntu 10. I want to add a MySql table as a data source but I can't see any options for connecting to mysql. Can any one guide me how to connect to mysql?...
Smit Shah's user avatar
  • 151
2 votes
1 answer
1k views

QGIS crashes when adding vector layer from mysql or testing connection to mysql

For a while I have been adding layers from my mySql database and all went well. Then I got crashes when adding new vector layers. Then I only got crashes and it is not possible to add layers from ...
Alex's user avatar
  • 155
3 votes
1 answer
457 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 ...
Alex's user avatar
  • 155
5 votes
1 answer
4k 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 ...
elrobis's user avatar
  • 6,380
4 votes
1 answer
542 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 ...
archerne's user avatar
7 votes
2 answers
19k views

Converting 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 - ...
Geert's user avatar
  • 71
1 vote
1 answer
275 views

How can i symbolize a map dynamically by data stored in mysql database in many tables (these tables have relationship through Primary Key and FK)

How can i symbolize a map dynamically by data stored in mysql database in many tables (these tables have relationship through Primary Key and FK). For instance "Disease Name"(chosen from drop down ...
SIslam's user avatar
  • 3,486
4 votes
2 answers
2k 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 ...
hoge6b01's user avatar
  • 1,088
7 votes
1 answer
912 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 "...
mactyr's user avatar
  • 171
3 votes
0 answers
1k 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 ...
P-A Lindkvist's user avatar
1 vote
1 answer
877 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 ...
sandeep's user avatar
  • 251
2 votes
2 answers
3k views

Drop Markers and MarkerCluster together from database

I've been working on my map which gets its 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 Q&A, but ...
wibni's user avatar
  • 29
2 votes
2 answers
689 views

Getting only one feature from MySQL

I would like to get only one feature from a MySQL database. I use the Add Vector Layer functionality in QGIS to get the features (polygons) from the MySQL database. They are all displaying fine, but ...
Julien Fouilhé's user avatar
1 vote
1 answer
453 views

Changing path to mysql socket in QGIS

I would like to use Mysql in QGIS. But when I want to create a new connection to the database (Add Vector Layer), I can't connect because QGIS is looking for /tmp/mysql.sock But I'm using XAMPP for ...
Julien Fouilhé's user avatar
2 votes
0 answers
870 views

Accessing MySQL data from python built-in console of QGIS?

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 ...
Arthur Portas's user avatar
2 votes
2 answers
2k views

How to overlay points from MySQL served by GeoServer on an OpenLayers map?

This might be a very basic question as I am new to GeoServer. What I am trying to do: I have a MySQL table that stores data attached to a spatial point and have latitude and longitude columns to ...
PravinCG's user avatar
  • 121
0 votes
1 answer
2k views

Is it possible to show markers from MySQL database with Javascript?

I'm interested if it's possible to show markers (latit, longit) from MySQL database with Javascript libraries like Leaflet?
againstflow's user avatar
  • 4,988
25 votes
5 answers
149k views

Find features within given coordinates and 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 users who are inside the circle or square of a given latitude and longitude with given distance. ...
shihab K's user avatar
  • 361
1 vote
1 answer
332 views

How can I Transfer mysql wkt directly into a postgis table?

I have wkt geometry data in mysql stored in blob format. I need to get this data into a postgis db and am looking for the quickest-easiest way to do it. I have managed to select the data "ASTEXT" but ...
Robert Buckley's user avatar
2 votes
0 answers
213 views

Populating ESRI GeoPortal programmatically? [closed]

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 ...
lukecampbell's user avatar