Showing entries 1 to 10 of 32
10 Older Entries »
Displaying posts with tag: GIS (reset)
Spring Cleaning in the GIS Namespace

In MySQL 5.7.6 we’ve done some major spring cleaning within the GIS function namespace. We have deprecated 66 function names and added 13 new aliases. Please see the release notes for a complete list of all the changes. But why have we done this, and what impact does this have for you?

Standardization

GIS is a growing area, and to keep MySQL up to speed we have made the GIS namespace more SQL/MM compliant. …

[Read more]
Where is the Language Data?

Image if you will,  a geographic database of locations and the language/s spoken there with keys to a dictionary of common words with keys the same word in all other languages.   And again image this database was like a wiki, so it could crowd sourced.  You could put in your own home and “English spoken here”.  And maybe this database would have keys to the words spoken in each language.

If there was an API for this database you could do simple application language translations.  Programs would not need to code tables for translations.  The “PUSH” or “OK” button would just have a key to that word.  A web app could do IP to GEO lookup and speak your language.  A mobile app could alert you “French spoken here”.

Oh and this would need to be FREE and in beer.

Does this exist?  Why not?

[Read more]
GeoJSON Functions

In recent years, GeoJSON has become a popular data format for exchanging GIS data due to several factors. The primary factors being that it’s easy to read, and it’s simple and lightweight. In 5.7.5, we added support for parsing and generating GeoJSON documents via two new functions: ST_GeomFromGeoJson() and ST_AsGeoJson(). These functions makes it easy to connect MySQL with other GeoJSON enabled software and services, such as the Google Maps Javascript API.

Since GeoJSON is a JSON format, we needed a library to parse and write JSON documents. After evaluating several candidates, we ended up with rapidjson due to its features, speed, and compatible license.

The new …

[Read more]
Geohash Functions

In MySQL 5.7.5, we introduced new functions for encoding and decoding Geohash data. Geohash is a system for encoding and decoding longitude and latitude coordinates in the WGS 84 coordinate system, into a text string. In this blog post we will take a brief look at a simple example to explain just how geohash works.

Where on earth is “u5r2vty0″?

Imagine you get a email from your friend, telling you that there is free food at “u5r2vty0″. But where on earth is “u5r2vty0″?

The first step in converting from “u5r2vty0″ to latitude and longitude data, is decoding the text string into its binary representation. Geohash uses base32 characters, and you can find the character mapping on …

[Read more]
Today is the day in which MyISAM is no longer needed

Of course, this is just a catchy title. As far as I know not all system tables can be converted to InnoDB yet (e.g. grant tables), which makes the header technically false. MyISAM is a very simple engine, and that has some inherent advantages (no transactional overhead, easier to “edit” manually, usually less space footprint on disk), but also some very ugly disadvantages: not crash safe, no foreign keys, only full-table locks, consistency problems, bugs in for large tables,… The 5.7.5 “Milestone 15” release, presented today at the Oracle Open World has an impressive list of changes, which I will need some time to digest, like an in-development ( …

[Read more]
Building MySQL 5.7

The 5.7.5 DMR is now available, and we’ve made some changes to our build system in this one, so I wanted to spend some time discussing how you would now build MySQL.

When we released our April labs release, I wrote about building MySQL with Boost. Now that the first GIS work using Boost.Geometry has passed all the hurdles and landed in a development milestone release (DMR), it’s time to revisit the topic. From now on (5.7.5 and newer), MySQL needs Boost headers to compile. It’s not optional.

We got a few bug …

[Read more]
Using UDFs for geo-distance search in MySQL

In my previous post about geo-spatial search in MySQL I described (along with other things) how to use geo-distance functions. In this post I will describe the geo-spatial distance functions in more details.

If you need to calculate an exact distance between 2 points on Earth in MySQL (very common for geo-enabled applications) you have at least 3 choices.

  • Use stored function and implement haversine formula
  • Use UDF (user defined function) for haversine (see below)
  • In MySQL 5.6 you can use st_distance
[Read more]
Importing Raster Based Spatial Data into MySQL 5.7

Setting up the Geospatial Data Abstraction Library
GDAL 1.10+ (by OS Geo) supports converting spatial data between various raster and vector (points, lines, polygons, etc.) based formats, along with supporting MySQL. MySQL and ESRI Shapefiles are generally the best supported combination today.

Version 1.10 of GDAL has big improvements over older versions, but most linux distros (EL6 has GDAL 1.7) only have packages for the older versions. I would recommend building the latest 1.11.0 release from source because the older source packages had a …

[Read more]
Making Use of Boost Geometry in MySQL GIS

This post talks about how we make use of Boost.Geometry in MySQL to implement reliable and efficient GIS functionality, as well as changes to the GIS features in the lab release. Now that InnoDB is the default storage engine for MySQL, our user base is rapidly transitioning to InnoDB. One capability that they have been demanding is a performant and scalable GIS implementation. Along with adding R-tree index support to InnoDB, we also decided to replace the original GIS algorithms with a more powerful, reliable, effective and efficient geometric engine.

MySQL 5.7 and GIS, an Example

Summary
This post will offer a very simple demonstration of how you can use MySQL 5.7 for Spatial features within your applications. In order to demonstrate this, I’ll walk through how we can determine the 10 closest Thai restaurants to a particular location. For this example, we’ll be using the apartment that I lived in when I first started working at MySQL, back in 2003.

For more details on all of the new GIS related work that we’ve done in MySQL 5.7, please read through these blog posts from the developers:

[Read more]
Showing entries 1 to 10 of 32
10 Older Entries »