Tag Info

Hot 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 ...


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.


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

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.


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 ...


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. >>> ...



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