Tag Info

Hot answers tagged

6

Your table seems to be an Amersfoort oblique stereographic (EPSG:28992). To use a lon/lat point as input, you need to create it as a lon/lat point, then transform it, so your distance function would look something like this: ST_Distance(geom, ST_Transform(ST_SetSRID(ST_MakePoint(5.112472, 52.008417),4326),28992))


4

I recommend you to have a look at the webpage epsg.io. There you can search also for regions to see which EPSG-codes are common for these regions. As you have written in your profile that you are from Sweden, I guess the coordinates are from Sweden,too. The best match i found so far was EPSG 3006 but i guess you flipped the x and y -values, is that possible? ...


3

The intersection of a Polygon and a LineString is a LineString and the intersection of two LineStrings is a Point (or MultiPoint), so you need to transform your Polygon into a LineString -> Shapely: LinearRings from shapely.geometry import shape import fiona # polygon layer poly = fiona.open("polygons.shp") # line layer line = fiona.open("lines.shp") # ...


2

The $x and $y values only work for point layers. Create a layer for polygon centroids and then that will give the x and y values using the $x and $y commands.


2

I have a new stack exchange account and don't have a reputation high enough to comment on the "Uncaught TypeError: Failed to execute 'putImageData' on 'CanvasRenderingContext2D': float parameter 3 is non-finite." error. This occurs because you have the lat and the long inputs backwards. map.getView().setCenter(ol.proj.transform([lat, long], 'EPSG:4326', ...


2

I'll assume you have your center points and their XY coordinates in a table. Step 3 requires an ArcGIS Advanced license. Create a point layer using your coordinates as the points. You can do this several ways, one is using the Add XY Data tool in ArcGIS. You just point the tool at your table of points. You'll need to specify which field is the X ...


1

ArcMap has this functionality available in a few easy steps, as described here. In the attributes table, add your X and Y fields to your feature class. Right-click on each field and select Calculate Geometry. Select X Coordinate of Centroid or Y Coordinate of Centroid as appropriate.


1

Try this : import com.vividsolutions.jts.geom.Coordinate; import javax.measure.unit.NonSI; import org.jscience.geography.coordinates.LatLong; import org.jscience.geography.coordinates.UTM; import org.jscience.geography.coordinates.crs.ReferenceEllipsoid; This method makes the conversion in JAVA and return a Coordinate. Is easy to obtain X and Y from ...


1

Seems to be easy, you just need to create the XY coordinate field in your polygone table and later in the script use the arcpy.da.SearchCursor(Poligone.shp,"FieldXY")in something similar to this. Hope this works for you ^^ with arcpy.da.SearchCursor("Poligone.shp",'Field') as Buscador: with open(nombarch2,"a+")as c: for row in Buscador: ...


1

It seems that all WMTS service that were suspicious in my question, were right; I was wrong. World of CRS definitions is not so simple. Actual axis order to be used while constructing TopLeftCorner, results from CRS definition. It has been explained e.g. at http://www.geotoolkit.org/modules/referencing/faq.html#axisOrder. For CRS like EPSG:3857, ...


1

Solution Using the analysis given at http://gis.stackexchange.com/a/20250 we may find the earth-centered Cartesian coordinates for a point at geodetic latitude f and longitude l are (x, y, z) = (a*cos(l)*cos(t), a*sin(l)*cos(t), b*sin(t)) where a is the semi-major axis (6 378 137 meters on the WGS 84 ellipsoid), b is the semi-minor axis (approximately 6 ...


1

Implemented for Javascript: var r = 100/111300 // = 100 meters , y0 = original_lat , x0 = original_lng , u = Math.random() , v = Math.random() , w = r * Math.sqrt(u) , t = 2 * Math.PI * v , x = w * Math.cos(t) , y1 = w * Math.sin(t) , x1 = x / Math.cos(y0) newY = y0 + y1 newX = x0 + x1



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