# Tag Info

21

This question assumes an ellipsoidal model of the earth. Its reference surface is obtained by rotating an ellipse around its minor axis (plotted vertically by convention). Such an ellipse is just a circle that has been stretched horizontally by a factor of a and vertically by a factor of b. Using the standard parameterization of the unit circle, t --> ...

17

PyProj assumes that your coordinates are in meters. I'd guess something relating to feet/meters is the cause of the issue. Calling a Proj class instance with the arguments lon, lat will convert lon/lat (in degrees) to x/y native map projection coordinates (in meters) If the optional keyword 'preserve_units' is True, the units in map ...

15

The geopy module provides the Vincenty formula, which provides accurate ellipsoid distances. Couple this with the wkt loading in Shapely, and you have reasonably simple code: from geopy import distance from shapely.wkt import loads line_wkt="LINESTRING(3.0 4.0, 3.1 4.1)" # a number of other elipsoids are supported distance.VincentyDistance.ELLIPSOID = '...

15

WGS-what? WGS-84? Depending on what accuracy you need, you may need to know a lot more information - my guess is that's why you've been down voted, though no-one bothered to leave a comment saying why. Here are two ways: Inaccurate, but probably 'good enough' One degree of latitude is approximately 10001.965729/90 kilometres (distance from the equator ...

15

The solution for an ellipsoid is pretty messy--it is an irregular shape, not a circle--and is best computed numerically rather than with a formula. On a world map the difference between the WGS84 solution and a purely spherical solution will only barely be noticeable (it's about one pixel on a screen). The same difference would be created by changing the ...

14

One simpler way would be to use the GDAL command line tools: gdalwarp infile.tif outfile.tif -t_srs "+proj=longlat +ellps=WGS84" That can be invoked easily enough via scripting for batch jobs. This will warp the raster to a new grid, and there are other options to control the details. http://www.gdal.org/gdalwarp.html The target (t_srs) coordinate ...

14

I'm a big fan of "preFeatureInsert".... var veclayer = new OpenLayers.Layer.Vector("vector", { projection: map.displayProjection, preFeatureInsert: function(feature) { feature.geometry.transform(projWGS84,proj900913); } });

12

As mdsumner said, it's much easier to use command line than the python bindings, unless you want to execute very complex tasks. So, if you like python, like I do, you can run the command line tool with: import os os.sys('gdalwarp infile.tif outfile.tif -t_srs "+proj=longlat +ellps=WGS84"') or iterate through a list of files: listoffiles=['file1, file2,...

11

WGS84 doesn't define a projection, so it's up to the GIS software to decide which projection to use for displaying the data on the screen (unless you manually pick a projection, of course). In the simplest case, a plate carée projection (i.e. equidistant cylindrical with standard parallel 0°) is used, which in essence just interprets the angular units of ...

10

Ian's answer is incorrect. WGS84 approximates Earth by an elipsoid, which is basically a deformed sphere. EGM96 is a more complex model based on the gravitational force of the Earth (which is not constant) that defines what "sea level" or "up/down" mean, a smooth but irregular shape called "geoid". WGS84 is the elipsoid that best fits that geoid, and this ...

9

WGS-84 is unprojected data. It uses a geodetic coordinate system, which means points are located on a spherical (ellipsoidal to be exact) modelisation of the earth. As a consequence, euclidian geometry is not valid for this kind of data. PostGIS «geometry» data type and associated functions work with planar coordinates and euclidian geometry computations. ...

9

It's simple but messy. Because you're working in ECEF, presumably you have the ray's origin (x,y,z) and direction vector (u,v,w) in ECEF coordinates, too. For the moment let's assume that during the time of travel to the earth's surface, the earth does not appreciably move. (The fastest part of the rotating earth, the Equator, moves about 0.45 km/sec and ...

9

Open Layers uses the term 'EPSG:4326' to mean the Plate Caree projection. Referring to 'WGS84' and EPSG:4326 as a projection has been common for so long that it is a source of confusion. This short-hand has been going on since before Google and OpenLayers came on to the scene. For instance, ESRI have been fudging the terms for as long as I can remember. ...

9

Well, technically, NAD83 is not a subset of WGS84. If you mine further in the SpatialReference.org projetion definitions, you can see the difference between the two projections. PROJ.4 definiton of NAD83: +proj=longlat +ellps=GRS80 +datum=NAD83 +no_defs PROJ.4 definition of WGS84: +proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs As you can see, the ...

8

I get the same results as @geographika when I run gdaltransform and the proj.4 tool cs2cs: \$ gdaltransform -s_srs EPSG:3734 -t_srs EPSG:4326 739400.9 2339327.3 -87.3195485720169 45.9860670658218 0 cs2cs +proj=lcc +lat_1=41.7 +lat_2=40.43333333333333 +lat_0=39.66666666666666 +lon_0=-82.5 +x_0=600000 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=us-ft ...

8

Here EPSG:32616 WKT, both are same PROJCS["WGS 84 / UTM zone 16N", GEOGCS["WGS 84", DATUM["World Geodetic System 1984", SPHEROID["WGS 84", 6378137.0, 298.257223563, AUTHORITY["EPSG","7030"]], AUTHORITY["EPSG","6326"]], PRIMEM["Greenwich", 0.0, AUTHORITY["EPSG","8901"]], UNIT["degree", 0.017453292519943295], AXIS["Geodetic longitude", EAST], ...

8

You can compare the two. In most applications I suspect the second (direct) method will be the one to choose. Accuracy of the first (iterative) method depends on the accuracy with which you do the computations and when you decide to stop iterating. It therefore can be made as accurate as the second method for all inputs where both are valid (the first ...

8

The problem is poorly documented by authoritative sources for English speakers, despite affecting millions of people on an everyday basis. I've spend the past two days trying to understand the situation and I've created a Wikipedia article about the restrictions on mapping in China and about the China GPS shift problem. Below is the part of my research that ...

7

GDAL runs on most platforms, including Windows, so I'm not sure where you get the idea it only runs on Macs! The easiest way of getting installed on your machine is to download OSGeo4W, which is an installer for all manner of desktop GIS goodness, from which you can just choose GDAL/OGR. Once you've done that, you can use the command line tool gdalwarp to ...

7

The shp2pgsql tool is used to load data into PostGIS. It is not meant for transforming projections. The -s flag of the command just tells shp2pgsql the SRID of your source data. It doesn't transform the projection at all. You can reproject it before you load it to PostGIS or after. To transform the projection before you load it to PostGIS, you can use GIS ...

7

You have a closing paren in the wrong place towards the end of your query. I tried this and got a NaN return, SELECT ST_AREA(ST_Transform(ST_GeomFromText('POLYGON((871325.790874952 6105405.3261047,871418.748307692 6105359.72944624,871346.22022442 6105215.141258,871254.85408906 6105261.72007212,871325.790874952 6105405.3261047))',4326),31467)) As sqm; ...

7

The first archive ("Roads Data - tables and layers") doesn't contain the projection information, which is pretty bad form. However, the second archive ("Roads ArcReader Projects") has the projection information in its .prj files: PROJCS["Clarke_1866_Polyconic",GEOGCS["GCS_Clarke_1866",DATUM["D_Clarke_1866",SPHEROID["Clarke_1866",6378206.4,294.9786982]],...

7

The linked kml file seems to contain valid degree coordiantes, but fails to open in QGIS. If you follow the source given in your link to http://www.ecaidata.org/dataset/spanish-and-mexican-land-grants-in-california, you can get a shapefile which misses its prj file. With some kind of educated guess, you will find that NAD27 / California Albers EPSG:3309 ...

6

By 'GPS ref' I'll take it you mean WGS84 based geographic coordinates. ITM looks to be EPSG:2039 on spatialreference.org, which includes the ESRI WKT. From your tags, it sounds like you're trying to do this transformation within ArcGIS, which can be accomplished using the ESRI WKT and something like the C# Projection Engine wrapper. There's a C# wrapper for ...

6

Here is the really easy way. Add a field to your existing feature class. Right click on the field title and choose "Calculate Geometry". You'll then have the option to pick your desired coordinate system and units of measure. One note: This calculation is static, so you will need to recalculate anytime you make changes.

6

You have a space after the colon. Projection("EPSG: 4326") should actually be Projection("EPSG:4326"), no space before 4326.

6

As om_henners advised it is better to use available library for this purpose as it is already implemented and tested by many people... So, take a look at pyproj Python lib. Here is a sample code for reprojecting WGS-84 long/lat to ITM (EPSG:2157) x,y: from pyproj import Proj, transform def reproject_wgs_to_itm(longitude, latitude): prj_wgs = Proj(...

6

Sightings constitute a (non-random) sample of some process or population. Accordingly, interpolation (especially) IDW is not a good idea: it solves a different problem altogether. Consider making a density map. When doing so, it's probably better to favor equal-area projections over conformal projections (because changes of area bias the density, whereas ...

6

The official OGC “Well-known Text Representation of Spatial Reference Systems” for EPSG 4326 (http://spatialreference.org/ref/epsg/4326/ogcwkt/) is (your second projection): GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",...

6

You need the subdataset full name from the query on the file: gdalinfo MOD04_L2.A2003001.0005.051.2010313005421.hdf >2003.txt With the subdataset name, you get the GCP coordinates in pixel and lon/lat: gdalinfo HDF4_EOS:EOS_SWATH:"MOD04_L2.A2003001.0005.051.2010313005421.hdf":mod04:Image_Optical_Depth_Land_And_Ocean >>2003a.txt With the ...

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