Quantcast
Channel: Question and Answer » osgeo
Browsing all 11 articles
Browse latest View live

How can I efficiently use a list comprehension on an ogr.layer inside a loop...

Problem statement I’m using python 2.7 and ogr 1.11.0 on Windows 7. I have two shapefiles: one for streets and one for junctions. The streets shapefile has fields listing the IDs of the start and end...

View Article


Grass extension from within OSGeo QGIS

It is not clear to me how the connection between GRASS and QGIS works. I am aware about GRASS plugin, GRASS tools in processing toolbox and GRASS GUI which comes with OSGeo installation. By default I...

View Article


problem transforming CRS coordinates EPSG:4269 to EPSG:3857 in python

source_srs = get_srs(shp_abs_path) source_epsg = source_srs.GetAttrValue("PROJCS|GEOGCS|AUTHORITY", 1) print source_epsg #prints 4269 target_epsg = 3857 # because these are headed to leafletjs...

View Article

Using gdal-java of OSGeo4W

I would like to use gdal_polygonize and gdalinfo in java. This site says: “Note that OSGeo4W includes a gdal-java package and a Java runtime making it fairly easily to build local Java applications...

View Article

Copying Feature from shapefile to new shapefile in c#?

I am Creating new shapefile from shapefile such as (Parcels.shp to Parc.shp) and i am success to copy one feature at a time but getting error when copying multiple feature suggest me. done:copy one...

View Article


Image may be NSFW.
Clik here to view.

How do a transform a geotiff image to use the projection of another image?

I have two sets of glib2 data from different sources which I would like to process together. Each image has a different projection and resolution (I don’t know if resolution is the correct word to use...

View Article

Find unit of EPSG-Code

I need a way to find out the unit of an EPSG-Code (e.g: meter) from java (ogr, gdal, osgeo?) but any other approach would be fine as well. I want to do something like: if(epsg.unit==meter){ do this }...

View Article

Converting JSON to GeoJSON MultiPoint using `ogr.CreateGeometryFromJSON`

I am trying to convert a JSON array to a geom in Python, by first converting it to a GeoJSON. I have point coordinates in a JSON array, [{'lat':100.0, 'lng':0.0},{'lat':101.0, 'lng':1.0'}] that I want...

View Article


GetRasterBand() method for gdal in Python

I was going through a tutorial book called Python Geospatial Development. On the chapter on using working with geospatial data in python there is an example of a script meant to handle and analysis...

View Article


ogr2ogr re-projection produces empty shapefile

I use the following to re-project a shapefile to EPSG 4326 using ogr2ogr: ogr2ogr -s_srs "+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs" -t_srs "+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs"...

View Article

Setting Up Lamp on my OSGEO ubuntu

I recently installed the latest OSGEO Lubuntu OS. As a plus it comes preinstalled with may tools and softwares. On windows it was easy to access WAMP SERVER but I am having trouble setting up and...

View Article
Browsing all 11 articles
Browse latest View live