1
vote
0answers
41 views

How to make crs transformation of a QgsVectorLayer?

I need to transform QgsVectorLayers in python from one crs into another crs. By googling I found the following solution ...
1
vote
1answer
46 views

Can't get SRS from PostGIS using Proj4 text

I'm having a problem transforming a point from the Australian MGA UTM datum (eg MGA Zone 51 http://spatialreference.org/ref/epsg/28351/) to WGS84 using GeoDjango. I've narrowed that down to a problem ...
0
votes
0answers
34 views

How can I define coordinate system of feature class when overlaying with coordinate zone shapes in python?

I have generated bounding boxes for CAD drawings that do not have defined coordinate system files. I know that each drawing could be in one of 6 different systems that do not overlap. My idea was to ...
0
votes
1answer
129 views

Writing shapefile with projection defined crashes fiona

I've just started trying to use Fiona to write out shapefiles. I found the example code below, which seems to work fine from shapely.geometry import mapping, Polygon import fiona # Here's an example ...
3
votes
1answer
76 views

Help with “projected XY to screen xy” conversion algorithm?

I'm trying to convert coordinates from any given coordinate system (be they the coordinates of a graph figure or a map, meaning they can span across both negative and positive values across any of the ...
2
votes
0answers
242 views

Split a Polygon that Crosses International Date Line, ArcPy [closed]

I have a lots of existing data in WGS-1984 (too much to manually edit). I need to split these lines and polygons by the international date line. More projection information: ...
1
vote
1answer
54 views

Calling QgsProjectionSelector from QGIS Python plugin?

I am trying to create a dialog that allows the user to select a coordinate system from either the recently used projections or a general list of all available projections. This would basically offer ...
1
vote
1answer
67 views

reproject vector layer with pyqgis with new CRS does not worl

In QGIS I am running a script in th python toolbar to export all visible vector layers to a GEOJSON with this snippet: canvas = qgis.utils.iface.mapCanvas() allLayers = canvas.layers() for i in ...
0
votes
0answers
36 views

Error 14: Could not open CRS database

I am using Python Console and loading a Vector Layer using python commands. When the layer is added, QGIS first asks for the CRS to use, but I don't have all the CRS listed out to select the Reference ...
0
votes
1answer
63 views

How do I check spatial reference on all parameters during Tool Validation?

How do I check spatial reference on all parameters during Tool Validation? Just looking for recommendations. Here is what I have already. This must work with existing validation. import arcpy class ...
0
votes
2answers
265 views

I get an ERROR 000622 when it checks for arcpy.DefineProjection_management

So the purpose of my code is to create a loop that copies shapefiles from a folder to my folder and change its projection 'GCS_WGS_1984'. Each shapefile starts with the year follow by the month and ...
1
vote
1answer
161 views

Error getting spatial reference as string in arcpy

I am trying to get the string associated with a spatial reference to print into an xml using arcpy and xml.cElementTree. Using the snippet: ... spatial_ref = arcpy.GetParameterAsText(3) ... Prj = ...
1
vote
1answer
72 views

Gdalinfo and QuantumGIS does not recognize Spatial Reference even though Python does

I apply the following Spatial Reference to a file: spatialRef = osr.SpatialReference() spatialRef.ImportFromEPSG(3411) outraster.SetProjection(spatialRef.ExportToWkt() ) geotransform = ...
4
votes
3answers
2k views

How to convert projected coordinates to lat/lon using Python?

I assume this is a basic question but I can't seem to find or recognize the solution. This site returns Point: X: -11705274.6374 Y: 4826473.6922 when you searching with the first key value of 000090 ...
5
votes
2answers
631 views

Stereographic projection of WGS84 ellipsoid on a plane[python]

I would like to ask you for help in following task. What I need to do is to derive local x,y coordinates from latitude, longitude, applying stereographic projection of WGS84 ellipsoid on a plane, ...
1
vote
0answers
96 views

Reference to Basemap instance's coordinate system

I use the matplotlib basemap toolkit (mpl_basemap.Basemap) to plot GeoTIFF images on a map background using pcolor() or pcolormesh(). For this purpose, I need to transform a meshgrid of x and y ...
3
votes
1answer
244 views

How to get spatial reference of a shapefile using python?

I always use arcpy.GetParameterAsText to get the spatial reference from the user. There should be a way to decide what is the spatial reference of a shapefile but I can't find it. Something like ...
1
vote
0answers
148 views

proj/pyproj converted coordinates offset

I'm using pyproj to convert some coordinates from WGS84 to OSGB36. When mapped out the converted and unconverted don't map to the same places on a map. The OSGB36 coordinates are mapped about 100 ...
2
votes
0answers
177 views

PyProj/Proj4 convert geographic to projected coordinates for Geostationary Data

I am trying to convert geographic coordinates (in degrees east/north lon lat) to projected coordinates in meters for geostationary full disc data (GVAR Goes East data from CLASS). To do this, I tried ...
0
votes
1answer
469 views

Geographic Transformations using ArcPy vs. Coordinate Systems used by ArcGis online basemaps

I have 3 shape files with undefined projection, but I know which one it was used (Lisboa_Hayford_Gauss_IPCC). I need to 1st Define Projection. It works. I need to transform it from WGS_1984, so I've ...
-1
votes
1answer
95 views

How to find the most east or west longitude around the date line

I've got a python script that is comparing extents of rasters in various projections. Generally it works, but sometimes, especially when the rasters are global in extent or cross the dateline it ...
2
votes
2answers
467 views

Python script to read coordinate system of an input feature class? [duplicate]

How to read the coordinate system of an input feature class in python script. How we can use "Describe()" function and tool validator for that purpose
6
votes
3answers
313 views

Using PROJ.4 library to transform from local coordinate system coordinates to global coordinate system using ground control points?

I have a point cloud whose coordinates are with respect to a local coordinate system. I also have ground control points with GPS values. Can I convert these local coordinates to a global coordinate ...
13
votes
1answer
458 views

Creating nanoscale DEM with GDAL

A bit of a strange question perhaps, but let me give you a breif explanation of the background before my actual questions: Atomic force microscopy (AFM) is a method that, in short (and to my limited ...
1
vote
1answer
354 views

Python GDAL/OGR: WGS84 & meters units

I'm dealing with shapefiles projected in: GEOGCS["GCS_WGS_1984", DATUM["WGS_1984", SPHEROID["WGS_84",6378137,298.257223563]], PRIMEM["Greenwich",0], ...
7
votes
1answer
2k views

GDAL/Python: How do I get coordinate system name from SpatialReference?

In Python, using GDAL, I've extracted a raster's projection as a WKT string as follows: wkt = dataset.GetProjection() # wkt is ...
1
vote
0answers
56 views

How to identify grid shift file used by osgeo in Python?

I wrote a Python script reprojecting points from a source coordinate reference system (SCRS) to a target one (TCRS) both identified by an EPSG code. I would like my python script to retrieve details ...
1
vote
1answer
244 views

Change coordinate system in multiple MXDs ArcGIS 9.3 using Python

I have to loop through some folders which may contain *.mxd files and change their coordinate system. I already found this piece of Python which should do the trick for ArcGIS 10.x (from here): ...
2
votes
1answer
116 views

How to get a list of all projections that are currently available in QGIS via the PyQGIS-API

i'm building a QGIS-Plugin and i want the user to choose a CRS out of a combobox in which the coordinates he would enter into some textfields are represented, so these can be converted into another ...
1
vote
1answer
108 views

keeping the coordinate system of raster files in the resulting raster file after operation with numpy

I'm trying to read as array two raster files using ReadAsArray in GDAL/python, perform some map algebra operation on it using numpy and then write the resulting raster file in GTiff format using ...
2
votes
1answer
297 views

How to programmatically determine whether a spatial reference factory code is valid?

I am using the following code segment to create a spatial reference. spatialReferance = arcpy.SpatialReference() spatialReferance.factoryCode = spatialReferanceFactoryCode ...
1
vote
1answer
362 views

ogr: how to use epsg database for RD New projection?

I'm trying to assign this EPSG projection to my newly created shapefiles using ogr. The OGR Projections Tutorial says: ...any geographic coordinate system in the EPSG database can be set by it's ...
2
votes
2answers
451 views

How do I set custom spatial reference/coordinate sys to my shapefile

I have a python code which converts JSON text file to a shapefile. I have to set coordinate system to this shapefile created. I do not want to access the .prj file from my computer as this code will ...
2
votes
2answers
659 views

Moving all shapefiles (SHP) in MXD to new File Geodatabase (*. gdb) using ArcGIS Desktop?

What I need to do is to move all the shapefiles in an mxd into a newly created gdb, checking prj, and update mxd reference. I have ArcGIS 10 SP4, license ArcView. I studied a bit of Python and get ...
0
votes
1answer
327 views

Generate a random 100x100 m bounding box in any projection in pure Python?

I'm given: Extend of WMS Layer SRS Now I want to, in standard 2.6 Python (no OGR or C lib dependencies), to generate a 100x100m random bounding box within that extent (assuming it is more than ...
2
votes
1answer
2k views

Projecting shapefile with transformation using OGR in python

I want to change coordinate system of a shapefile from British National Grid to WGS84 (in order to be able to convert it to KML later on). To get the best results of projecting I would like to use ...
9
votes
2answers
2k views

Measuring distance in spherical Mercator vs zoned UTM

I've got points in WGS84 lat/long and I'd like to measure "small" (less than say 5km) distances between them. I can use the haversine formula from http://www.movable-type.co.uk/scripts/latlong.html ...
20
votes
6answers
13k views

Defining projections for multiple shapefiles in ArcMap?

I have over 100 shape files that don't have .prj file and thus when I bring them into ArcMap 10 they show the coordinate system as unknown. I know all of the shape files coordinate system is GCS WGS ...