1
vote
1answer
30 views

Crop and reproject shapefile based on GeoTIFF sample

I have GeoTIFF with these attributes: Size is 495, 309 Coordinate System is: PROJCS["unnamed", GEOGCS["unnamed ellipse", DATUM["unknown", SPHEROID["unnamed",6370000,0]], ...
0
votes
1answer
24 views

Issue with gdal getprojection and setprojection returning different information

I am using Landsat imagery from the USGS. Those who use them may know that the projection attribute is wrong (everything is in the Northern hemisphere). I have a script to process tar.gz files and ...
2
votes
1answer
27 views

Error reading large virtual raster with rasterio: “Cannot invert degenerate transform”

I've created a virtual raster using gdalbuildvrt, which covers a large extent (England) at a high resolution. The data is fairly sparse, focused around the coastlines with no files covering inland ...
3
votes
1answer
58 views

Projection mismatch when plotting precipitation with ggplot

I'm trying to plot accumulated precipitation in Brazil for a given period, see code below: Load packages library(raincpc) library(SDMTools) library(raster) library(ggplot2) library(rgdal) ...
1
vote
0answers
66 views

MySQL+GDal+MapServer+OpenLayers WebMercator problem

I have a problem/question what is the most efficiant way to go from WGS84 (epsg:4326) to webmercator. Outline of the structure right now: MySQL Database: with point Latitude/Lontiude Data [~200 ...
0
votes
0answers
44 views

gdal read whole geotif band into vector

i have another c++ GDAL question. I try to read alle elevation data out of an GeoTiff file into a c++ vector so that i can get elevation at x,y like this: vector[x][y]. I also like to use this data to ...
1
vote
1answer
59 views

List the projection & datum of all the files in a folder

In QGIS/GRASS, is it possible to list the projection details of all the shp,tab,dxf files in a folder ? We are having 100 - 150 files in too many folders. We would like to create a table of Proj ...
1
vote
1answer
102 views

gdal2tiles generates small picture inside 256x256 tile

I've used gdal2tiles for generating tiles in number of different polar projections and always experienced the same problem — strange small picture inside normal 256x256 png with the rest of space ...
2
votes
2answers
36 views

Comparing projections of two datasets when SRID not available

Similar to this question: How to test if two GDAL datasets are in the same projection? However, the above does not cover cases where an SRID is not available. It can often be the case that an SRID is ...
4
votes
2answers
839 views

How to convert a NetCDF file to GeoTIFF using GDAL

I have a NetCDF file which contains data for the number of rain days in the UK. I'd like to convert it to a GeoTIFF, but can't get GDAL correctly georeference it. See dumps from gdalinfo below. I ...
4
votes
1answer
208 views

Why is tiff different in epsg 3857 and epsg 900913 in gdal

When I transform tiff from 4326 to 3857 and from 4326 to 900913 in gdal, I get different result(when display in Qgis) eventhough these two projections(3857 and 900913) should be the same. What is ...
0
votes
1answer
53 views

how to correct merge rasters with different projections? [closed]

how to merge rasters with different projections with correct transforn? For example EPSG:32636 and EPSG:32637 if i do it with gdal_retile command, i have correct view for EPSG:32637 rasters and ...
2
votes
1answer
124 views

Axis of rendered shape files not showing numbers that are latitude and longitude

I am using rgdal to render some shape file. The first is a set of building zones from NYC Open Data. The second is the NYC coast line from OSM. The Zone files seems to generally render an X axis ...
0
votes
0answers
146 views

gdal python set projection of a raster - does not work

Gdal 1.9.2, ECW driver: ECW/ERDAS Compressed Wavelets (SDK 3.x) I am having problems with the script that supposed to set projection of the ECW to EPSG:27700, i.e. the British_National_Grid. Please ...
0
votes
1answer
81 views

GDAL - projection from pixels to geo coordinates

I am using GDAL library in C++. On my dataset, I have obtained geo transform with GetGeoTransform to GT array (GCP is NULL). Than I use this values for this equation (Source): Xgeo = GT(0) + ...
1
vote
2answers
376 views

GDAL/proj4 equirectangular projection coordinate system units assumed by OGRSpatialReference and GDALDataset::GetGeoTransform()?

How do I configure my OGRSpatialReference object to specify an equirectangular projection system http://en.wikipedia.org/wiki/Equirectangular_projection where the affine geo-transform matrix (provided ...
3
votes
2answers
112 views

in python, srs.ExportToProj4() returns an empty string, why?

I have a shapefile with the following .prj file: ...
3
votes
0answers
328 views

Fortifying re-projected shapefile for ggplot2 in R

I have a shapefile of US county boundaries which I got from the NHGIS. I can load the file using the rgdal package and see information about it: library(rgdal) shp_1860 <- readOGR("shp", ...
0
votes
0answers
125 views

why readOGR() is not reading projection information from .spj - r

0 down vote favorite I successfully import a polygon shapefile with readOGR, however the information in the .prj file is not being imported. test class : SpatialPolygonsDataFrame nfeatures : 19407 ...
1
vote
2answers
156 views

will ogr get coordinates in geographic coordinate system or projected coordinate system when using getPoint(int,OGRPoint*)

Consider the code that I have written in the stackoverflow question How to extract vertexes of geometries in ESRI shapefiles using ogr library with c++, I have used the code to show shapefiles on an ...
1
vote
0answers
740 views

How do I change from lat/long to a metric coordinate system in GRASS?

Yes, it's yet another transformation question. I am working with ASTER DEM data, which is LatLong WGS84. I want to process the DEM map into an STL file for use in a CFD simulation. The script I am ...
3
votes
1answer
110 views

is it possible to project a shapefile to a raster's custom projection with command line gdal/ogr?

I have a raster with a user defined sinusoidal projection and a shapefile in lat/lng coordinates (I believe this is called 'unprojected'?). I'd like to use ogr/gdal's command line utilities to ...
1
vote
2answers
697 views

How can I use GDAL to batch define a projection?

I have a fodler with 1500 ECW rasters, no spatial reference information defined. Can I use GDAL to batch define a projection for all 1500 in the folder?
0
votes
0answers
61 views

Why does ERDAS not like my GDAL output?

I am creating a raster using GDAL and the IMAGINE file doesn't work in ERDAS because it doesn't recognize the projection. Here is the code to generate a sample: from osgeo import gdal projectionWkt ...
0
votes
1answer
156 views

What's the best way to add a projection to GDAL?

I have a number of files in Maryland State-Plane (US foot) that have the following wkt: "PROJCS["NAD_1983_StatePlane_Maryland_FIPS_1900_Feet", GEOGCS["NAD83", DATUM["North_American_Datum_1983", ...
1
vote
1answer
37 views

Michigan Projection with GDAL or FWTools

Has anyone come across a specific projection for Michigan, specifically: NAD_1983_CORS96_StatePlane_Michigan_South_FIPS_2113_Ft_Intl When I look at spatialreference.org I do not find any instance of ...
0
votes
0answers
47 views

How to retrieve PROJECTION value for a map?

I am trying to read the Projection from Geotiff/shape file, using gdal 1.9.0 by the following command in the command line... gdalinfo.exe -proj4 map-path but its retuning empty string for ...
1
vote
1answer
343 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], ...
1
vote
1answer
626 views

Python GDAL: degrees to meters without reprojecting

I am trying to get senseful results in my Python script. I want to measure distance between features in a shapefile. I'm working with the SRS: GCS_WGS_1984, so my units are in degrees. But for the ...
1
vote
1answer
1k views

How to transform World data from EPSG 4326 to EPSG 3857

I have tryed different opensource tools to transform a world data shapefile from 4326 to 3857 but I always have an error. Im not sure, but is it because of Antartica? I have tryed with GDAL and QGIS ...
1
vote
0answers
428 views

Using gdal to convert from UTM to equidistant lat/lon

I am getting rather confused with converting a UTM gridded dataset into a equidistant/rectangular latlon gridded dataset. Can anybody help me? I have a UTM set with the following projection: ...
11
votes
1answer
266 views

Assign projection to a satellite image

Today I stumbled upon a picture taken from the ISS looking down Europe and it is really beautiful. So, I started thinking I could add more to the picture. Like world borders, cities, road network, ...
3
votes
3answers
4k views

How can I get the proj4 string or EPSG code from a shapefile .prj file? [duplicate]

I have to work with a shapefile defined in an unusual projection, which my GIS software does not know about. How can I get the proj4 definition or the EPSG code for the projection?
4
votes
2answers
706 views

Cartesian world sized projection WKT/EPSG code?

I am after the EPSG code or Well Known Text (WKT) of a projection that puts the centre of the earth a 0,0,0 and each point is a cartesian XYZ distance from that. My existing data is in WGS84 ...
3
votes
1answer
102 views

How to test if two GDAL datasets are in the same projection?

I'm attemping to write a funciton to test if a list of datasets are in the same projection. Naively, I thought I could test the text of WKTs, but that does not work in the following case: ...
2
votes
1answer
335 views

How to re-project the EASE (Equal Area Scalable Earth) grid with a ~25 km cylindrical projection to WGS84 0.25 degree?

I have nc files ,here is one file https://echange-fichiers.inra.fr/get?k=LUfqiyO1Dl7az5bihnS. from the metadata ,the projection is cylindrical and the resolution is 25 km: ...
4
votes
2answers
326 views

How do I Capture GDAL projection and create matching output (OGR or GDAL) shape files?

Working in C++, using GDAL and OGR: Depending on what the user has supplied for image input, I need to output point (or other) shape files in the same projection as the input raster images. The ...
2
votes
0answers
160 views

projection discrepancy with gdal (1.9) and proj4

I boiled the problem down to that python example: import sys try: from osgeo import gdal from osgeo import osr except: import gdal import osr if __name__ == '__main__': version_num = ...
3
votes
1answer
396 views

Get the geotransform in Mercator given a pixel size away from the origin

I have a radar image with the following information: The projection is Mercator (Mercator_1SP in GDAL) The projection origin is 0º lat 0º lon At a given geographic coordinates (e.g. lon=10º ...
11
votes
2answers
787 views

How to reproject raster from 0 360 to -180 180 with cutting 180 meridian

I have a geotiff raster image that has a coordinate system with longtitudes from 0 to 360. The horizontal center of the image is 180 longtitude. See image below: I want to transform it to EPSG:4326 ...
4
votes
1answer
269 views

How to convert a png with known bounds from Plate Carree to Mercator with GDAL

I have a png image that shows the region defined by the geo bounds UpperLat, LeftLon, BottomLat, RightLon (in degrees & -ve for West Lon and South Lat) in Plate Carree EPSG:4326. I want to convert ...
12
votes
2answers
3k views

API documentation for Gdal/Ogr with C#

I want to assign projection to shapefile in my web C# application, for this i am using Gdal/OGR/OSR C# bindings and add osr_csharp.dll and ogr_csharp.dll references. But i am facing some difficulty ...
2
votes
1answer
458 views

How to determine area of pixel in meters with GDAL and Python?

I have a raster loaded in Python using GDAL bindings. I'd like to be able to determine the area of a pixel in meters although I'm not confident that the projection is in meters. On this page I see a ...
3
votes
2answers
236 views

What projection is this in GDAL classification

I need to re-project a PNG from a given projection to the Google maps projection. I have a grid of the source projection, looks like a Mercator projection. What is the exact name of this projection in ...
1
vote
1answer
274 views

How to reproject a noaa bsb nautical chart?

I have some nautical charts in .BSB format. GDAL can read bsb and I successfully imported them to qgis. But I can't figure out what is the coordinate system they use. Does anyone has some experience ...
2
votes
1answer
742 views

How to provide transform information to openlayers on Image layer

I would like to include an overlay raster layer into my OpenLayers map. I've pre-transformed the image into the correct projection (EPSG:900913) and saved as a png using the gdal_translate command: ...
6
votes
2answers
691 views

What's a good toolchain to reproject some PNGs in plate carre to UTM?

I have some PNGs produced from Canadian DEM data. They're 1201px by 1201px heightmaps. Each one represents one quarter of a degree latitude and one quarter of a degree longitude. But I want to work ...
5
votes
2answers
3k views

How do I use GDAL to convert from an arbitrary projection/datum into Equirectangular/WGS84?

I've been trying to use GDAL to convert from an arbitrary projection/datum into Equirectangular (aka Plate Caree, aka Equidistant Cylindrical, aka Geographic, aka Lat/Long) with WGS84 datum. All of ...
5
votes
1answer
579 views

What is north-up projection?

How do I know what projection to use for north-up or 0 rotation? I have a gtiff (ND83-nf) that gives me the error when importing to Grass. Should I re-project or recreate the image with the rotation ...
0
votes
3answers
429 views

Need help understanding why gdal projections aren't giving me what I expect?

When using gdaltranslate and gdalwarp I specify the following transfomation (in for GCP's and translate, out for warp) +proj=lcc +lat_1=40.03333333333333 +lat_2=38.73333333333333 +lat_0=38 ...