Tag Info

Hot answers tagged


I have done this before using forward azimuths, here is a link that has descriptions and algorithms that may be helpful: Inverse/Forward Utilities A forward azimuth calculates a new point that is a specified distance and compass bearing from a starting point. The basic idea is that you have a point in Lat/Lon and you calculate a series of forward azimuths ...


If you have an IPointCollection you can add points to it (IPoint), be careful which point you use as there are many types that are "point", the one you want is IPoint: IPoint pPoint = new PointClass(); // in C# Dim pPoint as IPoint = new PointClass() ' in VB.net Then add to the IPointCollection, assuming known X,Y and Z: Dim pPntColl as IPointCollection ...


Shapely PyQGIS, and GeoDjango use the same API based on the GEOS library: With Shapely: with a list of points: from shapely.geometry import Point, LineString, mapping pt1 = Point(0,0) pt2 = Point(20,20) pt3 = Point (50,50) line = LineString([pt1,pt2,pt3]) #GeoJSON format print mapping(line) {'type': 'LineString', 'coordinates': ((0.0, 0.0), (20.0, ...


JTS polygons are clockwise (see http://tsusiatsoftware.net/jts/jts-faq/jts-faq.html#B6 for an explanation of why). Why it would give you an invalid geometry is a difficult question to answer with out seeing your input polygons. Most likely causes are self intersection, self touching, invalid geometry in input list.


I'd go with the Geometry Accessors Width: ST_XMax - ST_XMin, and the related functions for Y to give height.


Probably after your requirements get complicated, it is best to think of making a scalable application. The advantage of working with a geometric column is the index, plus you can also work with wkt, GeoJSON and other standards that openlayers postgis and handle very well, so you would simplify the development Here you can find a good tutorial

Only top voted, non community-wiki answers of a minimum length are eligible