Tag Info

New answers tagged

4

Python does not contain a separate library for GDAL but rather bindings to access the GDAL libraries. As GDAL is updated so are the affected bindings, ensuring that you'll have full access to GDALs functionality from Python. If you upgrade GDAL you will also upgrade the Python bindings (if the version you upgrade to supports Python bindings). If you build ...


0

Maybe this will help... http://stackoverflow.com/questions/13489835/gps-positioning-with-python-geopy-shapely I would be nice if there were a GDAL function for this. What I did for my self (not needing a high level of efficiency) was convert the shape file x, y coordinates to lat, lon coordinates using osr. Then I looped through the polygons and calculated ...


1

That solved my problem. Further information and a tutorial can be found here http://gdal.org/1.11/ogr/ogr_apitut.html A C++ version for GDAL 1.11: #include <GDAL/ogrsf_frmts.h> int main() { OGRRegisterAll(); OGRDataSource *poDS; poDS = OGRSFDriverRegistrar::Open( "data.shp", FALSE); }


1

If you look at this and this, they say that both GDALOpenEx() and GDAL_OF_VECTORS were (will be?) introduced in GDAL 2.0. GDAL 2.0 seems to be still under development. In case that you are able to compile it, you can find the source code here. In older versions you would use OGROpen to read a Shapefile.


2

I used the ogr java bindings: public static void unitOfCRS(){ SpatialReference poSourceSRS = new SpatialReference(); // output: metre poSourceSRS.ImportFromEPSG(3068); System.out.println(poSourceSRS.GetAttrValue("UNIT")); // output: degree poSourceSRS.ImportFromEPSG(4326); ...


1

You could perhaps look into the PROJ4 library. There seems to be a Java binding, which you could use. I am almost confident that I have done a similar task before, although with Python, but I cannot find my code to double check. Either way, there should be a way to get a string which includes all the parameters of a specific coordinate system. You would ...


0

After a day of struggling with GDAL, I can confirm the methodology works and runs quickly. I was working with ice chart E00 files from CIS which I had converted to arcinfo coverage using avcimport. I have posted my prototype code below to help others. The E00 was converted to an arcinfo coverage called "test". The script must be run from the same directory ...


1

After some digging I find out a GetSpatialReference method for the Geometry class (note the different name to the GetSpatialRef method in the Layer class). So the code should follow something like: $ python Python 2.7.6 (default, Mar 22 2014, 22:59:56) [GCC 4.8.2] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> ...


3

Resolved! It's a module PATH Python console problem. In QGIS Brighton/apps/Python27/Lib/site-packages create osgeo.pth (Administrators) file and put # .pth file for the osgeo extensions osgeo start QGIS and install flowmapper ;) Clarifying, after create osgeo.pth file, open him and just add in first line the word osgeo, save and run QGIS! Done.



Top 50 recent answers are included