Geographic Information Systems Asked on April 19, 2021
I have a Shapefile that is automatically loaded in QGIS. While loading the data the coordinates x & y are automatically displayed.
In my attribute table I have lat_1
, long_1
and lat_2
, long_2
in the same row. How can I display both at the same time? Is there any solution for that in QGIS?
lat_1, long_1
is the main location. lat_2, long_2
is entry point location.
That means in attribute table field names should be unique right. So it will display only x and y. But in my attribute table there are entry points (lat, long) they are also coordinates. So I want the both x & y (main and entry) displayed. Added screenshot is the attribute table format
There are several options to do that:
If one of the points is already shown on the map and you want to include the other one, you can use your attribute values to create new geometries with expressions. In the screenshot you see how the red point is created in this way, the name of the attributes can be selected on the right side by expanding Fields and values
where you see the values available. The blue point is the one based on POI_X
and POI_Y
values:
To create two points at once, you can use this expression - however the result will be a multipoint geometry. You can convert it to single points using Menu Vector / Geometry Tools / Multipart to Single parts
:
union (
make_point ( "X1" , "Y1"),
make_point ( "POI_X" , "POI_Y" )
)
Another option is to use Create points layer from table
to create an additional layer, see here for more details: https://gis.stackexchange.com/a/392917/88814
With this solution, you might use batch mode to create several points at once, but each on a separate layer:
Export your shapefile as csv (delimited text), than add it to QGIS using Data source manager with the relevant settings, see screenshot. In this case however, you can load only one point per feature.
Correct answer by Babel on April 19, 2021
Get help from others!
Recent Questions
Recent Answers
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP