What's the best way to save KML in MySQL? - mysql

I have a few maps with certain areas (zones) which I'll want to capture in KML. Within those areas I need to pinpoint addresses.
How do I save those maps with its values as efficient as possible to query them later?

Maybe you could use MySQL spatial extensions.
Take a look at GIS and Spatial Extensions and to GIS on MySQL

Related

Integrating CSV person data on Google Maps through Bluemix?

I am working on a project with a large CSV file that containes the location and movement of users. I would like to place this on a custom map in Google Maps via bluemix and use Bluemix Services to explore the data.
The primary goals are:
Getting the CSV data on the custom Google map. When running, the data should progress in time and show the movement of users.
Making the CSV points cluster for UX. (so that points that are near each other would stack together)
My primary question is how to get started on this. Do you reccommend i work on this locally and then connect Bluemix to my project or can i create all of this in Bluemix. I would much prefer the last option if possible.
If you have any suggestions to Watson Services or other Bluemix Features that may improve the app this is also greatly appreciated
Thank you for your time.
Ps. I realize Google Maps integrates best with Java Script. Do you recommend converting the CSV to Json when working with Bluemix?
This is a quite broad question and maybe not well suited for stackoverflow (stackoverflow is not a discussion forum, it is a competition of what answer is the most accurate one for a very strict question) so maybe this is a question for https://developer.ibm.com/answers/ instead.
That said, bluemix works well with js, java, ruby, python, go, php, etc (probably js and java better than the others) so I'd go in this direction. Also, I think you should investigate bluemix geospatial analytics (https://console.ng.bluemix.net/catalog/services/geospatial-analytics/) for your application.
For data storage, I suggest you to take a look on cloudant (https://console.ng.bluemix.net/catalog/services/cloudant-nosql-db/) which is a very popular option in bluemix and suits well for most cloud apps. If you want to take a more traditional approach, you can also consider a relational db such as DB2 (https://console.ng.bluemix.net/catalog/services/ibm-db2-on-cloud/)

Spatial Indexing with SQL and Node

I'm about to start a Node.js with a lot of POI (point of Interest) that will be saved on SQL database.
Is there a way to make proximity searches (ie find all POI near a given point within a given range) easily with SQL and Node? I would like to use geohash algorithm + bookshelf for ORM but I can't find any document on the Internet explaining how to start.
Mongodb has a geo spatial index. I would like the same thing but with SQL.
Any help would be welcome
Geohash is simple translate the points to a binary and interleave it. Treat it as base-4 number. Try the Microsoft Bing tiling system. It has some free code example.

How to use Google Fusion Tables

Am beginner to Fusion tables Concept. I have already tried my hands on some basic features of Fusion tables SQL API and liked it. Following are some questions I have with respect to the same. Request your help in the same.
Whats the benefit of using Fusion table API for storing data and presenting it on Map via Google Maps V3 API which could other wise be done using V3 API over our own data source?
Whats the way forward on Private Fusion tables? I am worried on removing the technology altogether since its still in Beta or putting usage limitations that would limit the usage of the end application? Also can the data security be trusted.
Whats the difference between Table API and SQL API?
I can only answer question 1. I can think of several advantages which will depend on the nature of your data.
Greatly improved map display performance when dealing with thousands of markers (points, lines and polygons). Tiles are generated dynamically by Google for quick display via the Map API with no marker creation overhead
Geocoding. Addresses and/or existing KML can be used when you lack lat/lon locations
There is a fairly simple SQL like filtering mechanism via the Maps API which includes spatial queries
FT have an undocumented but extremely useful JSONP option which uses the same SQL like syntax.

Restfull point in polygon in SQL Azure

I want to create a restfull WCF service in Azure to store polygons drawn in Bing maps. Each polygon has also a descriptive text. Response format must be JSON.
The most important feature must be to retrieve the list of polygons (with text) for a given point (lat long) (so I must have a point in polygon routine).
I am not a geo expert, but I was recommended to use the geo spatial part of SQL Azure. How can this be done ?
I have a suggestion.
- First try implementing your polygon detection in standard SQL Server.
- then port your SQL Server solution to an Azure equivalent.
- and finally expose a WCF interface to your functionality.
If you break it down like this you may find it easier to ask more specific questions that are more likely to get answered.

Spatial analysis in SAS?

Is there a way to do spatial analysis (NOT just graphics) in SAS? What I really want is the ability to geographic queries like one can do in PostGIS or SpatialLite in PROC SQL.
I asked this on the SAS-L list and got nothing.
Thanks!
I'm not sure whether your question is specific enough about what you're wanting to do, for someone to give you a good answer.
If you've got lat/long data, you could do detail and aggregate queries by choosing where clause criteria based on the lat/long values.
Incidentally, you might want to check out http://runsubmit.com for another stackoverflow style site with a more concentrated population of sas users.
I'm not familiar with PostGIS or SpatialLite, but SAS has some procedures dedicated to GIS specific tasks. This link says
SAS/GIS software enables you to do
more than simply view your data in its
spatial context. It also enables you
to interact with the data by selecting
features and performing actions that
are based on your selections.
I don't know if proc sql will be able to easily replicate those features, but once the data is in SAS data sets, I don't see why you couldn't at least do some basic querys.
SAS also has some examples data and code working with spatial data here.
The answer seems to be No, SAS doesn't support spatial datatypes and operators like spatialite or postgis.
(I am answering my own question to close the discussion, but thanks to all!)
Actually, when you consider that the SQL queries in Spatialite/PostGIS are just being translated into a specific method of calculation. It can actually be done.
So to answer your question, can it be done in SAS in an easy way like spatialite (i.e simple queries?), No
But you could write a function to do what you need using Base SAS, i find SAS to be one of the best languages to use for quick data analysis.