Tag Info

Hot answers tagged

5

Assuming you have a reference to the feature class pFC: ERSI.ArcGIS.Geometry.ISpatialReference pSP = ((ESRI.ArcGIS.GeoDatabase.IGeoDataset)pFC).SpatialReference; coord=pSP.FactoryCode coord now contains the code for the coordinate system. Note that not all projected coordinate systems are defined in esriSRProjCSType, there are more constants ...


4

The best way I can think is to get two UTM points, convert them to Lat/Long, and compare their geodesic distances to their UTM pythagorean distance. E.g. Take a point from this example: The CN Tower is ... in UTM zone 17, and the grid position is 630084m east, 4833438m north. So if we take A (17n 630084 4833438) and move it 30 km east, we get B (17n ...


4

If you divide those "strange" latitudes and longitudes by 11930465, you get the North and East degree values you expect: But don't ask me why ;-)


4

Based on the conversation on the comments, ArcGIS online is making a guess at the coordinate system, while ArcMap is not. When it encounters an unknown coordinate system, ArcGIS Online appears to automatically assume WGS 1984. ArcGIS for Desktop treats undefined coordinate systems differently and does not make assumptions about the data's actual coordinate ...


4

The geographic coordinates systems (also called lat/long) are defined by 3 features : a datum, a prime meridian (most of the time, it is Greenwich) and a unit (most of the time, it is degree). The EPSG code help to unambiguously identify a geographic coordinate sytem (you can find the description on spatial reference.org) GEOGCS["WGS 84", ...


3

For the first part of your question: GDAL can guess the format of the input file from the file extension. The output format is defined by the -f option. If it is missing, Geotiff is assumed, but you get that warning if the file extension is not .tif. For a .grd output, you can select between GS7BG (rw+v): Golden Software 7 Binary Grid (.grd) GSAG (rwv): ...


3

The spatial reference for a map is defined either by the extent passed to the map constructor or by the first layer added to the map. Checkout the any projection sample to see how to specify different spatial references for a map. If you're using the basemap or center and zoom options with the map constructor, the map's spatial reference will be web ...


3

Your Gauss-Krueger projection uses +datum=potsdam. Up to 2012, this was hard coded in proj4 to a very unprecise value using a 3-parameter-transformation. You find more exact values for 7-parameter transformations in this topic: http://forum.openstreetmap.org/viewtopic.php?id=12723 There is an even better ntv2-grid transformation available here (take the ...


3

You are probably looking for the Define Projection tool (under Data Management, Projections and Transformations). Unlike Project, which will transform from one coordinate system to another (e.g. -119.789° becomes some large number of meters), Define Projection changes the coordinate system for the data itself and is appropriate to use when ArcMap is ...


3

I'd suggest not writing this yourself, but instead using one of the existing coordinate transform libraries, such as proj4j or the CRS part of GeoTools. From GeoTools (with some JTS help): import com.vividsolutions.jts.geom.Geometry; import org.geotools.geometry.jts.JTS; import org.geotools.referencing.CRS; import org.geotools.geojson.geom.GeometryJSON; ...


3

This issue has been sleeping here for long, but this might help some googler: For a similar task I simplified the functions from the website that you mention to the following, it works fine for me (in Python): def LatLonToPixels(lat, lon, zoom): tileSize = 256 sinLat = math.sin(float(lat) * (math.pi/180)) py = (0.5 - math.log((1 + sinLat) / (1 - sinLat)) / ...


3

You can't transform from one SRID to another without knowing what the SRID you are transforming from is. It looks like in your case that the coordinates are Spherical Mercator, which is SRID 3857. So, if this is true, then you can use ST_Transform in conjunction with ST_SetSRID: UPDATE roads SET geom = ST_Transform(ST_SetSRID(geom, 3857), 4326); and then ...


3

I bet those values are US survey feet, and based on the document, also on NAD 1927, not NAD 1983. The app you're using is using the NAD 1983 definitions of the State Plane zones. The parameters are different, so you're not going to be able to convert NAD 1927 coordinates using it. If I convert the given values (cropping to integers) using the NAD 1927 ...


3

You can have your WFS server reproject the data by adding the srsName parameter to your URL (i.e. http://ec2-54-69-8-151.us-west-2.compute.amazonaws.com:8080/geoserver/WRIA9/ows?service=WFS&version=1.0.0&request=GetFeature&typeName=WRIA9:2009BuildingsCOS&maxFeatures=50&outputFormat=application/json&srsName=epsg:4326). Then your ...


2

Can you try this (change GeoJSON to the format you want to load.): vector_format = new OpenLayers.Format.GeoJSON({ 'internalProjection': new OpenLayers.Projection("EPSG:31466"), 'externalProjection': new OpenLayers.Projection("EPSG:3857") }); result = vector_format.read(newFeatures); vectorLayer.addFeatures(result); This worked for me.


2

This is pieced together from the link @PolyGeo commented. Copy/paste this into the Python window: sr = arcpy.SpatialReference() sr.loadFromString('{B286C06B-0879-11D2-AACA-00C04FA33C20}') mxd = arcpy.mapping.MapDocument("CURRENT") df = arcpy.mapping.ListDataFrames(mxd)[0] df.spatialReference = sr arcpy.RefreshActiveView() I tested it in ArcMap and it ...


2

The source code of the application page shows that WMS layers are read with parameter "&SRS=EPSG:22185 A test with gdaltransform http://www.gdal.org/gdaltransform.html gives support for this: gdaltransform -s_srs epsg:22185 -t_srs epsg:4326 5434921.2799996715 6359301.360077026 -60.6956426930295 -32.9071417880402 0 Not quite same as your numbers but ...


2

Your dataset should appear in QGIS with EPSG:5652. If not, use Set CRS for Layer to get it. The 6-digit CRS is EPSG:25832. Rightclick on the layer, Save As ... under a different name and that CRS, and add it to the canvas. It might be even enough if you just change the project CRS to EPSG:25832, leaving the dataset unchanged.


2

If you need high accuracy distances, or "ground" distances, you need to convert your UTM "grid" distances (which you do indeed calculate via pythagorous) using a combined scale factor. This removes the distortion introduced by the combination of (a) reducing the horizontal distance at its elevated (above the ellipsoid) position on the earth and (b) ...


2

As commented by @jbchurchill and @user23715, I recommend checking your Output Coordinates setting under your Environments tab to see what it is set to. I/we do this because in the Point To Raster (Conversion) help it lists the Environments respected by that tool as being: Environments Compression, Current Workspace, Output Coordinate System, ...


2

Yes, you may use this site for batch processing: Batch Conversions of Latitude/Longitude to Address (Reverse Geocoding) 46.7270,2.5059 = Rue des Varennes, Saint-Amand-Montrond, Cher, Centre, Metropolitan France, 18200, France This site uses MapQuest reverse geocode service. You will have to apply some additional logic to parse out the city/town name ...


2

Taking the suggestion by mkennedy for EPSG:28992, the points are located this way: which does not fit well, unless the WGS84 coordinates are rough or wrong. There is also an Amersfoort RD Old projection, but that is far off. Looking closer, the RD New points perfectly match to adresses in Openstreetmap, while the WGS84 are just road junctions; the lower ...


2

The code looks like the USNG or MGRS coordinate system, see https://en.wikipedia.org/wiki/United_States_National_Grid and https://en.wikipedia.org/wiki/Military_grid_reference_system for further details. 12RVU indicates that you are in UTM zone 12, somehwere in Western Mexico. You might need to read the manual on how to change the setting (I don't have the ...


1

You would do something like this: dataset = "c:/data/landbase.gdb/Wetlands" spatial_ref = arcpy.Describe(dataset).spatialReference as per the ESRI help page here


1

As per the response syntax and example in the documentation here, ArcGIS Server should definitely be returning the spatialReference to you explicitly. see this thread for more info about the confirmed bug.


1

I declared one point in each octant of the globe, transformed it to XYZ using the equations I had, and then tested martin f's answer. It didn't returned the same points. Then I delved deeper into Wikipedia's equations, and I finally understood how they worked. Then I adapted them. latitude(r, x, y, z) = arcsin(z/r)(180/π) longitude(r, x, y, z) = if (x ...


1

What you need to do is a spatial join on the lat/long coordinates and the french postal zones Here is the tutorial http://www.qgistutorials.com/en/docs/performing_spatial_joins.html The GIS DATA... postal zones can be found on this website https://www.data.gouv.fr/en/datasets/correspondances-code-insee-code-postal-idf/ Hope this helps!!


1

Just a difference between documentation and code. Recent versions of Fiona sniff out whether there's an entry in the EPSG table corresponding to the projection and preferentially return that.


1

In your case you can add the item to define the crs string to the URI like &crs=EPSG:4326. Your code should look as follows: uri = "file:///C:/data.csv?type=csv&xField=lng&yField=lat&spatialIndex=no&subsetIndex=no&watchFile=no&crs=EPSG:4326" vlayer = QgsVectorLayer(uri, 'Points', "delimitedtext") ...


1

You first need to import the CSV and give it which fields are x and y co-ordinates and the projection of your data. This should be the large comma icon which says Add Delimited Text Layer. If you then go to the Vector menu (you may need the Ftools plugin installed but this comes as standard in recent versions of QGIS I believe) then Analysis, you have a ...



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