Skip to main content

Posts

Showing posts with the label GDAL/OGR

Generating map tiles with GDAL2Tiles

GDAL2Tiles is a command line tool that allows easy publishing of raster maps on the Internet. The raster image is converted into a directory structure of small tiles which you can copy to your webserver. GDAL2Tiles is included in GDAL/OGR 1.5.0 release. GDAL2Tiles is compatible with the Tile Map Service (TMS) Specification . TMS has been proposed as a standardised way in which map tiles are requested by clients and how servers describe their holdings. TMS is not an "official standard" and is currently managed by the Open Source Geospatial Foundation ( OSGeo ). The specification is based on multi-resolution image pyramids. Tile maps are composed of a set of scale-appropriate cartographic renderings, each divided up into regularly spaced image tiles. If the supplied raster map uses EPSG:4326 projection, GDAL2Tiles also generates necessary metadata for Google Earth ( KML SuperOverlay ). When the user is zooming or panning tile maps, only the tiles not currently in memory are r...

Loading spatial data into MySQL

To be able to create choropleth maps in geobrowsers you'll need polygon data for the geographical units you want to map. These polygons can then be coloured according to a statistical value. If you want to store geographic features in an open source database, you have two options: PostGIS / PostgreSQL or MySQL Spatial . MySQL has limited GIS support compared to PostGIS, but I want to test if it's sufficient for thematic mapping. I will recommend two software packages: XAMPP and FWTools. XAMPP is an easy to install Apache distribution containing MySQL, PHP and PERL. FWTools is an open source GIS binary containing MapServer , GDAL/OGR , Proj.4 , OpenEV , OGDI and Phyton. Maybe more than you need, but it is an easy install. The Swiss Army Knife is the GDAL/OGR library. I have my boundary polygons stored in a shapefile. There is no MySQL command which enables you to upload spatial data to a database table (this can be done with PostGIS using the shp2pqsql command) . If you ha...