Tag Info

Hot answers tagged

16

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


14

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


13

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


12

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


12

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


11

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 o files: listoffiles=['file1, file2, ...


10

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


9

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


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

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


7

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


6

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


6

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


6

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


6

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


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


6

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


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

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


6

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


6

If you are running QGIS 2.0.1, you can import the data as delimited text layer. It offers you to select DMS Coordinates, comma as decimal separator and EPSG:4326 as CRS. Once you have the data loaded, you can rightclick on the layer -> Save as and choose EPSG:32632 for the output file.


5

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.


5

What you're looking for is an equal-area projection, and ideally one which also partially preserves shape. In the past, I've used the USGS projection DSS to help guide these decisions, it'll walk you through a process of choosing a good projection. More generally, tools like Flex Projector and Tissot's Indicatrix should help guide a decision: they provide ...


5

If you don't mind using an external library, Proj4js may address your requirements here. Following the UserGuide example, your destination "projection" would be 'EPSG:4326'.


5

I wrote a C program to do this many years ago. They are hard, being complex arithmetic series approximations that have to be solved iteratively. I had to define my own structure to handle imaginary numbers and create the complex arithmetic operations. The equations are on the LINZ website to do this. ...


5

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


5

For such problems, I try to visualize the points in QGIS to see where they are placed. From your parameters, I created a custom CRS with the definition: +proj=sterea +lat_0=54.4353877827032 +lon_0=18.4514121640352 +k=0.999790760649094 +x_0=41614.2107651061 +y_0=17150.1692507701 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs and created points in ...


5

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


4

You could also use Shapely's length property, i.e.: from shapely.wkt import loads l=loads('LINESTRING(3.0 4.0, 3.1 4.1)') print l.length


4

You can temporally re-project the data on the fly in arcmap and use CTRL+SHIFT+G to open the Calculate Geometry dialog box and calculate the area with the current projection (meter/feet) after the field is populated you can go back to WGS84 but the area will remain (unless you recalculate the area again)



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