Tag Info

Hot answers tagged

4

When you start with a Python module, there are several solutions to find the available functions. One of them is dir: geom = feat.GetGeometryRef() print dir(geom) ['AddGeometry', 'AddGeometryDirectly', 'AddPoint', 'AddPoint_2D', 'Area', 'AssignSpatialReference', 'Boundary', 'Buffer', 'Centroid', 'Clone', 'CloseRings', 'Contains', 'ConvexHull', 'Crosses', ...


2

If you are trying to calculate correct distance by projecting geographic coordinates (lon-lat) to map coordinates (E-N) and then using plane coordinate geometry, then you either need to project using an appropriate equidistant map projection -- probably not a good idea if you have points at arbitrary locations and distances in arbitrary directions or ...


2

I suggest adding to the end of your script:- o3_proj.Destroy() o3_proj = None As from other OGR tutorials I've read when working on my scripts, these calls at the end are suggested as necessary to ensure not just memory release, but also writing out data. Let us know how it goes - as your use of SetFeature() does appear correct as far as I can tell. And ...


1

The shapefile format has some limitations due to the underlying dbase database format. See: http://webhelp.esri.com/arcgisdesktop/9.3/index.cfm?TopicName=Geoprocessing%20considerations%20for%20shapefile%20output In your case, the limit of 10 characters field name and 255 fields total is hit. Try some other format, like spatialite. Or think about ...


1

Converting OSM to PBF is probably not necessary, most tools that can read PBFs can also read OSM XML. If you do need to read the file with osmosis, the issue here is that ogr2osm by default generates files that can be loaded in JOSM and merged with existing OSM data. These files have no timestamp or version attributes as well as having negative IDs, while ...



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