We’re rewarding the question askers & reputations are being recalculated! Read more.
72

Use ST_AsText to view the point object: SELECT ST_AsText(the_geom) FROM myTable; To view X, Y, and the geom object: SELECT ST_X(the_geom), ST_Y(the_geom), ST_AsText(the_geom) FROM myTable;


53

In addition to ST_AsText (which returns geometry as WKT / Well Known Text), there are several additional output formats, like ST_AsGeoJSON(). Take a look in http://postgis.net/docs/manual-2.0/reference.html#Geometry_Outputs and choose, what fits your needs best.


46

This is tricky for two reasons: first, limiting the points to a circle instead of a square; second, accounting for distortions in the distance calculations. Many GISes include capabilities that automatically and transparently handle both complications. However, the tags here suggest that a GIS-independent description of an algorithm may be desirable. To ...


40

The terms are medieval: latitude (n.) late 14c., "breadth," from Old French latitude (13c.) and directly from Latin latitudo "breadth, width, extent, size," from latus "wide," ... . Geographical sense also is from late 14c., literally "breadth" of a map of the known world... In the fourteenth century, most known-world maps made in the Christian and ...


39

There can be some confusion over the difference between a Spatial Reference System (SRS) and a Coordinate Reference System (CRS), and unfortunately WGS84 is often used for both. EPSG:4326 is merely the reference number of EPSG's database entry describing a CRS. Typing 4326 into their website here gives us this: The things to note here are that 4326 refers ...


32

Use plugin Numerical Vertex Edit (https://plugins.qgis.org/plugins/numericalVertexEdit/). Or create table with Lat/Lon/Name and save in csv, then load csv table in QGIS (Add Delimited text layer) (info gis-lab.info)


26

In ol.proj.transform you need to specify the fromProjection before the toProjection, then it should work. As Michael Gentry explains in his answer, another Problem is that you have to specify the longitude (west-east thus x) first and then the latitude (south-north thus y). And a better way to set the center is to get the current view and set the center ...


25

The coordinates are in MGRS (Military Grid Reference System) which is a projected coordinate system. Those coordinates give you an accuracy of 0.1 meters since there are 10 trailing digits. You can batch convert the coordinates in online websites like this The first 3 charcters are the "grid zone desiganation" : 38R the next two characters are the 100,...


21

Short answer The containerPoint methods date from a feature request back in 2012, and today, they're a bit confusing. The best answer is Leaflet maintainer Vladimir Agafonkin's description: "layerPoint is actually a point relative to the map layer (the div which contains tiles and markers), not the outer map container. What you need is map....


18

No Plugin Required This is possible with QGIS without extra plugins using the Advanced Digitizing panel. This tool allows entering exact coordinate values as well as constructing points at given distance and angle from other points. Note: The advanced digitizing tools are not available in geographic coordinates. Pictures taken from this excellent answer ...


18

Frank Donnelly provides a CSV file of country centroids that's based on data taken from the GeoNames Server, but hand curated by Frank. The data was last updated in February 2012. May 2018 The former source isn't available anymore, here is a newer one, with lots of infos on the countries (incl. Centroids), and possibility to download the data in several ...


17

To save you some time here is @MerseyViking answer in javascript: function radians(n) { return n * (Math.PI / 180); } function degrees(n) { return n * (180 / Math.PI); } function getBearing(startLat,startLong,endLat,endLong){ startLat = radians(startLat); startLong = radians(startLong); endLat = radians(endLat); endLong = radians(endLong); ...


16

Maybe I'm not understanding, but you seem to be entering Longitude Latitude coordinates (-97, 21) in degrees,into a CRS that is UTM based, and uses meters. If you're declaring this as SRID 26918, then the long/lat values must be in that CRS. If the Long/Lat values are in degrees then you will need to create the geometry as ST_SetSRID(MakePoint(...),4326) ...


14

Something like this should work: ## One example of a SpatialPolygons object mapping Earth's land areas library(maptools) data(wrld_simpl) ## Create a SpatialPoints object set.seed(0) lat <- runif(10, -80, 80) lon <- runif(10, -180, 180) points <- expand.grid(lon, lat) # Note that I reversed OP's ordering of lat/long pts <- SpatialPoints(points,...


14

The drawn feature are added to the layer named vector. See draw interactions constructors. // Get the array of features var features = vector.getSource().getFeatures(); // Go through this array and get coordinates of their geometry. features.forEach(function(feature) { console.log(feature.getGeometry().getCoordinates()); });


13

When geographic coordinates are plotted "without projection", they are really being projected via the Simple Cylindrical (aka, Equirectangular, or Plate Carrée) projection. (It goes by many different names.) Geographic coordinates, as latitudes and longitudes, are said to be unprojected because they define positions on a (curved) sphere or ellipsoid – ...


13

Your coordinates are out of order. If you reverse the order of coordinates in the first query, postgis says: 708.55982691. In postgis it's lon, lat, not lat, lon.


13

You can often make a WKT (Well Known Text) column in Excel without too much fiddling, which effectively creates a spatial definition for points, lines or polygons within a single field. What you want to do is create a WKT string, in the format: POLYGON((X1 Y1, X2 Y2, X3 Y3, X4 Y4, X1 Y1)) You can create new columns in Excel with the below formulas. The ...


12

It looks to me like you need to perform the trigonometry in radians not degrees. You use a function toDeg() so presumably you have one called toRad() (or possibly fromDeg() if you're odd). Call that function with your latitude and longitude values before the calculations, and you should be set. Edit I just tried this in Python (the syntax isn't dissimilar ...


12

Yes you can place a point at exact coordinates. There are a couple of ways you can do this. One is interactively by digitizing a point and then, while still in edit mode select the "Numerical Vertex Edit" button at the right hand end of the edit toolbar. You highlight a point and then type in the location in the popup box. The other way, if you have ...


12

If you want to interactivelly change your points coordinates, one by one, I believe you can do what you want by using the Numerical Vertex Edit Plugin. I can install it in Plugins > Fetch Python Plugins and search it by its name. After installing you will notice a new icon on you digitalizing toolbar like this . To make it active you must be editing a layer....


12

Using QGIS, you can use the SwapXY plugin. You can also do this with GDAL/OGR: https://trac.osgeo.org/gdal/wiki/FAQVector#HowdoIflipcoordinateswhentheyarenotintheexpectedorder


12

You can use the GDAL Python bindings. Examples on how to use it can you find here. For example you create points with lat/lon like this from osgeo import ogr # first import the library point1 = ogr.Geometry(ogr.wkbPoint) point1.AddPoint(13.381348,52.536273) # Berlin point2 = ogr.Geometry(ogr.wkbPoint) point2.AddPoint(11.557617,48....


12

According to the ogr2ogr csv documentation and also this answer, you need to specify which fields contain the geometry in a VRT file: <OGRVRTDataSource> <OGRVRTLayer name="test"> <SrcDataSource>test.csv</SrcDataSource> <GeometryType>wkbPoint</GeometryType> <LayerSRS>WGS84</LayerSRS> ...


12

Typically, NAD83 and WGS84 are within one meter of each other. Your concerns about differences of 2.5 feet, which are less than a meter, indicate you do need to perform this datum transformation. Briefly, this calculation requires knowledge of when the coordinates were collected so that their movement over time can be accounted for (primarily due to the ...


11

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


11

You need to install the 'Numerical Digitize' plugin first. Then you can use Numerical Digitize command to Create points in QGIS with exact (manually entered) precise coordinates. The Numerical Digitize command is found on the Digitizing tool bar. Make sure your Toggle Editing is on for the layer you want to digitize (add coordinates to), so that ...


11

Just install the Numerical Vertex Edit plug-in for QGIS. It installs a new button in the shape menu bar and allows you to numerically edit the vertex of a polygon typing the coordinates. ciao


11

With a table in UTM SELECT ST_X(table.geometry) AS X1, --point x ST_Y(table.geometry) AS Y1, --point y ST_X(ST_TRANSFORM(table.geometry,4674)) AS LONG, -- longitude point x SIRGAS 2000 ST_Y(ST_TRANSFORM(table.geometry,4674)) AS LAT, --latitude point y SIRGAS 2000 ST_ASTEXT(table.geometry) AS XY, --wkt point xy ST_ASTEXT(ST_TRANSFORM(table.geometry,4674)) ...


11

Importing the GPX file with add vector layer, and selecting track_points layer, you get all collected height data in ele field. Saving that to shapefile, it is possible to change color according to the ele value, or create raster grids etc.


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