Simplified (or smooth) polygons that contain the original detailed polygon

Edit As of 2013, most links below are not functional anymore. However, I’ve found the cited paper, algorithm included, still available at this (very slow) server. Here you can find a project dealing exactly with your issues. Although it works primarily with an area “filled” by points, you can set it to work with a … Read more

Get altitude by longitude and latitude in Android

My approach is to use USGS Elevation Query Web Service: private double getAltitude(Double longitude, Double latitude) { double result = Double.NaN; HttpClient httpClient = new DefaultHttpClient(); HttpContext localContext = new BasicHttpContext(); String url = “http://gisdata.usgs.gov/” + “xmlwebservices2/elevation_service.asmx/” + “getElevation?X_Value=” + String.valueOf(longitude) + “&Y_Value=” + String.valueOf(latitude) + “&Elevation_Units=METERS&Source_Layer=-1&Elevation_Only=true”; HttpGet httpGet = new HttpGet(url); try { HttpResponse … Read more

NoSQL and spatial data

graphs databases like Neo4j are a very good fit, especially as you can add different indexing schemes dynamically as you go. Typical stuff you can do on your base data is of course 1D indexing (e.g. Timline or B-Trees) or funkier stuff like Hilbert Curves etc, see Nick’s blog. Also, for some live demonstration, look … Read more

Leaflet.draw mapping: How to initiate the draw function without toolbar?

This simple code works for me: new L.Draw.Polyline(map, drawControl.options.polyline).enable(); Just put it into the onclick handler of your custom button (or wherever you want). The variables map and drawControl are references to your leaflet map and draw control. Diving into the source code (leaflet.draw-src.js) you can find the functions to draw the other elements and … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)