Extract Latitude/Longitude from polygon vertices on QGISPoint to PolygonCan't open Spatialite db from openstreetmap in Quantum GISExtract Longitude and Latitude from Geotiff (ASTER 30m DEM)Polygon centroid coordinates update errorAdd XY coordinates same values as Latitude LongitudeHow to convert shapefile to a set of Latitude and Longitude coordinates in QGIS?QGIS - Vector coordinates have incorrect formatQGIS CRS does not have correct coordinatesExtracting vertices in line segments using ArcGIS Desktop?Determining which latitude and longitude values fall within township/district/polygons
How does Rust's 128-bit integer `i128` work on a 64-bit system?
Does KNN have a loss function?
Can't understand an ACT practice problem: Triangle appears to be isosceles, why isn't the answer 7.3~ here?
Protect a 6 inch air hose from physical damage
Pre-Greek θάλασσα "thalassa" and Turkish talaz
Plotting Chebyshev polynomials using PolarPlot and FilledCurve
"Fewer errors means better products" or "Fewer errors mean better products"?
Does the problem of P vs NP come under the category of Operational Research?
Being told my "network" isn't PCI compliant. I don't even have a server! Do I have to comply?
Is law enforcement responcible for damages made by a search warrent?
Backpacking with incontinence
Map vs. Table for index-specific operations on 2D arrays
Could flaps be raised upward to serve as spoilers / lift dumpers?
How did Biff return to 2015 from 1955 without a lightning strike?
Has J.J.Jameson ever found out that Peter Parker is Spider-Man?
What's the term for a group of people who enjoy literary works?
Export economy of Mars
Can I say "Gesundheit" if someone is coughing?
Can it be useful for a player block with a hanging piece in a back rank mate situation?
How do I safety check that there is no light in Darkroom / Darkbag?
Is it moral to remove/hide certain parts of a photo, as a photographer?
How to structure presentation to avoid getting questions that will be answered later in the presentation?
Return last number in sub-sequences in a list of integers
Matrix condition number and reordering
Extract Latitude/Longitude from polygon vertices on QGIS
Point to PolygonCan't open Spatialite db from openstreetmap in Quantum GISExtract Longitude and Latitude from Geotiff (ASTER 30m DEM)Polygon centroid coordinates update errorAdd XY coordinates same values as Latitude LongitudeHow to convert shapefile to a set of Latitude and Longitude coordinates in QGIS?QGIS - Vector coordinates have incorrect formatQGIS CRS does not have correct coordinatesExtracting vertices in line segments using ArcGIS Desktop?Determining which latitude and longitude values fall within township/district/polygons
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
Created a global map by adding the OpenStreetMap and WorldMap layers in QGIS. Drew polygons over that, creating what I believe is a polygon layer.
I've also created a layer of the Nodes/Vertices of the Polygon by clicking Vector->Geometry Tools->Extract Vertices
(see photo)
- Would like to extract the latitude and longitude of these polygon points (csv, GeoJSON, or somehow connect to MSQLServer eventually)
I've tried adding calculated fields to the Attribute Tables of the Vertices layer following but am new to GIS and have been unsuccessful.
qgis polygon latitude-longitude
add a comment |
Created a global map by adding the OpenStreetMap and WorldMap layers in QGIS. Drew polygons over that, creating what I believe is a polygon layer.
I've also created a layer of the Nodes/Vertices of the Polygon by clicking Vector->Geometry Tools->Extract Vertices
(see photo)
- Would like to extract the latitude and longitude of these polygon points (csv, GeoJSON, or somehow connect to MSQLServer eventually)
I've tried adding calculated fields to the Attribute Tables of the Vertices layer following but am new to GIS and have been unsuccessful.
qgis polygon latitude-longitude
add a comment |
Created a global map by adding the OpenStreetMap and WorldMap layers in QGIS. Drew polygons over that, creating what I believe is a polygon layer.
I've also created a layer of the Nodes/Vertices of the Polygon by clicking Vector->Geometry Tools->Extract Vertices
(see photo)
- Would like to extract the latitude and longitude of these polygon points (csv, GeoJSON, or somehow connect to MSQLServer eventually)
I've tried adding calculated fields to the Attribute Tables of the Vertices layer following but am new to GIS and have been unsuccessful.
qgis polygon latitude-longitude
Created a global map by adding the OpenStreetMap and WorldMap layers in QGIS. Drew polygons over that, creating what I believe is a polygon layer.
I've also created a layer of the Nodes/Vertices of the Polygon by clicking Vector->Geometry Tools->Extract Vertices
(see photo)
- Would like to extract the latitude and longitude of these polygon points (csv, GeoJSON, or somehow connect to MSQLServer eventually)
I've tried adding calculated fields to the Attribute Tables of the Vertices layer following but am new to GIS and have been unsuccessful.
qgis polygon latitude-longitude
qgis polygon latitude-longitude
edited Jul 23 at 23:58
MrXsquared
3,4081 gold badge10 silver badges26 bronze badges
3,4081 gold badge10 silver badges26 bronze badges
asked Jul 23 at 23:20
MariaMaria
182 bronze badges
182 bronze badges
add a comment |
add a comment |
2 Answers
2
active
oldest
votes
Open your attribute table of the layer you want to add this information to and its field calculator. Create a new field with data type double/real and give it a length of 3 and a precision of, lets say, 8. Name it x/lng and y/lat and insert the expression
x(transform($geometry, layer_property(@layer_name, 'crs'), 'EPSG:4326'))
for longitude and
y(transform($geometry, layer_property(@layer_name, 'crs'), 'EPSG:4326'))
for latitude.
This expression will work with every source crs, so you do not need to care about that. In case your layers crs already is EPSG:4326, it would be enough to just enter the expression $x
or $y
.
add a comment |
If you need latitude and longitude as csv you may simply right click your vertices layer and choose Export > Save Features as...:
Then in the dialogue chose Comma Separated Value [CSV] in the combo box on top:
Chose a file name and if applies various restrictions for the output (attributes to export, extent,...). Scroll down and under Layer Options select the output format for your coordinates (here I chose 'AS_XY'). Note the tooltip!
The result will be something like (opened in Notepad++):
add a comment |
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "79"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fgis.stackexchange.com%2fquestions%2f329757%2fextract-latitude-longitude-from-polygon-vertices-on-qgis%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
Open your attribute table of the layer you want to add this information to and its field calculator. Create a new field with data type double/real and give it a length of 3 and a precision of, lets say, 8. Name it x/lng and y/lat and insert the expression
x(transform($geometry, layer_property(@layer_name, 'crs'), 'EPSG:4326'))
for longitude and
y(transform($geometry, layer_property(@layer_name, 'crs'), 'EPSG:4326'))
for latitude.
This expression will work with every source crs, so you do not need to care about that. In case your layers crs already is EPSG:4326, it would be enough to just enter the expression $x
or $y
.
add a comment |
Open your attribute table of the layer you want to add this information to and its field calculator. Create a new field with data type double/real and give it a length of 3 and a precision of, lets say, 8. Name it x/lng and y/lat and insert the expression
x(transform($geometry, layer_property(@layer_name, 'crs'), 'EPSG:4326'))
for longitude and
y(transform($geometry, layer_property(@layer_name, 'crs'), 'EPSG:4326'))
for latitude.
This expression will work with every source crs, so you do not need to care about that. In case your layers crs already is EPSG:4326, it would be enough to just enter the expression $x
or $y
.
add a comment |
Open your attribute table of the layer you want to add this information to and its field calculator. Create a new field with data type double/real and give it a length of 3 and a precision of, lets say, 8. Name it x/lng and y/lat and insert the expression
x(transform($geometry, layer_property(@layer_name, 'crs'), 'EPSG:4326'))
for longitude and
y(transform($geometry, layer_property(@layer_name, 'crs'), 'EPSG:4326'))
for latitude.
This expression will work with every source crs, so you do not need to care about that. In case your layers crs already is EPSG:4326, it would be enough to just enter the expression $x
or $y
.
Open your attribute table of the layer you want to add this information to and its field calculator. Create a new field with data type double/real and give it a length of 3 and a precision of, lets say, 8. Name it x/lng and y/lat and insert the expression
x(transform($geometry, layer_property(@layer_name, 'crs'), 'EPSG:4326'))
for longitude and
y(transform($geometry, layer_property(@layer_name, 'crs'), 'EPSG:4326'))
for latitude.
This expression will work with every source crs, so you do not need to care about that. In case your layers crs already is EPSG:4326, it would be enough to just enter the expression $x
or $y
.
answered Jul 23 at 23:54
MrXsquaredMrXsquared
3,4081 gold badge10 silver badges26 bronze badges
3,4081 gold badge10 silver badges26 bronze badges
add a comment |
add a comment |
If you need latitude and longitude as csv you may simply right click your vertices layer and choose Export > Save Features as...:
Then in the dialogue chose Comma Separated Value [CSV] in the combo box on top:
Chose a file name and if applies various restrictions for the output (attributes to export, extent,...). Scroll down and under Layer Options select the output format for your coordinates (here I chose 'AS_XY'). Note the tooltip!
The result will be something like (opened in Notepad++):
add a comment |
If you need latitude and longitude as csv you may simply right click your vertices layer and choose Export > Save Features as...:
Then in the dialogue chose Comma Separated Value [CSV] in the combo box on top:
Chose a file name and if applies various restrictions for the output (attributes to export, extent,...). Scroll down and under Layer Options select the output format for your coordinates (here I chose 'AS_XY'). Note the tooltip!
The result will be something like (opened in Notepad++):
add a comment |
If you need latitude and longitude as csv you may simply right click your vertices layer and choose Export > Save Features as...:
Then in the dialogue chose Comma Separated Value [CSV] in the combo box on top:
Chose a file name and if applies various restrictions for the output (attributes to export, extent,...). Scroll down and under Layer Options select the output format for your coordinates (here I chose 'AS_XY'). Note the tooltip!
The result will be something like (opened in Notepad++):
If you need latitude and longitude as csv you may simply right click your vertices layer and choose Export > Save Features as...:
Then in the dialogue chose Comma Separated Value [CSV] in the combo box on top:
Chose a file name and if applies various restrictions for the output (attributes to export, extent,...). Scroll down and under Layer Options select the output format for your coordinates (here I chose 'AS_XY'). Note the tooltip!
The result will be something like (opened in Notepad++):
answered Jul 24 at 5:06
Jochen SchwarzeJochen Schwarze
6,9855 gold badges21 silver badges67 bronze badges
6,9855 gold badges21 silver badges67 bronze badges
add a comment |
add a comment |
Thanks for contributing an answer to Geographic Information Systems Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fgis.stackexchange.com%2fquestions%2f329757%2fextract-latitude-longitude-from-polygon-vertices-on-qgis%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown