QGIS: all my points end up in the Atlantic Ocean - csv

I'm following the tutorial guides in QGIS webpage, but I can't correctly import the dataset from the .csv file in the guide.
Here you can download the .csv file
Here you can download the shape .shp file
I imported the shp just by double clicking on it inside of QGIS
I pressed ctrl+L to open the delimited text layer window
from there i selected the .csv file using x as longitude and y as latitude
Here the result
Wrong point localization
What I did
The latitude and longitute coordinates look correct in the .csv file
I copied a location coordinates from the world map (ireland in my case) and I created a test .csv file with those coordinates. When import the csv file in my project it is placed in the atlantic Ocean and not in Ireland.
Is this a bug? I really can't understand what is happening.
As you can see the points are relatively well distributed, that means the original information is correct but there is something that has to do with the scale of the points that does not work (even tho coordinates are not ambiguous)

You will need to know a few things.
1.If the files you are using have coordinates systems assigned to them.
I am unsure about shp files as i deal mainly in Mesh Datasets and Rasters.
I do know that the CSV coordinates or Text file coordinates if they are GPS values ie:Lat Long have to be saved into a co-ordinates system value and that the QGIS project has to use the same coordinate system. The system uses the GPS coordinates to place the points accurately on the QGIS map. My Method is to use a site like bbox and use my Coordinates system of choice and record these Lat Long values into .CSV and then copy the same CRS settings from bbox within QGIS project then the shp and or imported files end up placed correctly when you load the imported text file layer or shp file. Also file formatting is important for text files like you have ie:CSV. If you set the CRS within the QGIS project if the layer you import in is from another CRS QGIS will automatically change this to the CRS you have set. If you do not have geographic information setout correctly you will have the problem you have now also another problem is if the file does not contain CRS information at all.
But from what you are telling us this looks like a CRS mismatch problem.
2.What the coordinates system is for the files you have ie:epsg 4326 or 3857 these are two very different different systems that can drastically alter the placement of your points.
3.If they dont have a coordinate system assigned to them then you will need to assign one and use this same coordinates system within QGIS project before you import in the files. .
4.If the files do contain coordinate systems references then in QGIS you will need to set the project CRS system to the same as the files you have. This will apply the CRS to all layers you add to this project weather they are vectors, mesh, rasters and or base layers.
Good luck.

Related

How to convert longitude and latitude data into shapefiles for NetLogo

I have some longitude and latitude data and would like to load them into NetLogo for modeling. I used QGIS to load and visualize the data successfully. Then I exported the data as shapefiles (.shp) format, and there are several other files being exported togeter with postfix .shx, .dbf, .qpj, .prj, and .cpg.
But when I tried to load the data in NetLogo as
extensions [ gis ]
globals [ elevation ]
to load
clear-all
set elevation gis:load-dataset "MyDir/XXX.shp"
gis:set-world-envelope gis:envelope-of elevation
end
it reported an error saying "Extension exception: only GEOGCS and PROJCS are supported"
I searched the error online and think maybe it is because the file I exported from QGIS is not supported by NetLogo. But I know nothing about GIS data, so have no idea how to fix this problem.
I compared my .prj file with the example file of NetLogo GIS extension, googled the difference, and found out the solution, which is as followed.
In the QGIS, click Project and select Properties. There is a CRS tag on the left. Open it and one can find a "Coordinate reference systems of the world" window, inside which click the first class named Geographic Coordinate Systems, and choose the one named GCS_WGS_1984_XX.
Click OK and go back to the main panel. Right click your layer and set the layer's CRS. Choose the GCS_WGS_1984_XX one. Now export the layer and it can be loaded by NetLogo successfully.

Is it possible to export geometry data from a shapefile to CSV from QGIS?

I'm trying to get geometry data from a large quantity of shapefiles into a database (Google Datastore). The thing is, I don't need to work with maps, I just need the coordinates, so I would like just the numerical coordinates. Ideally I'd like to use CSV, but any plain text would be workable. I have a Mac and have been able to get QGIS installed (I also tried udig but the interface was baffling). While it is easy to load a shp file into QGIS as a vector layer, I'm lost as to how to export the geometry, or even if it is possible.
Does anyone know how to extract plain text geometry from a shp file? Ideally with QGIS, but any method would be appreciated.
The "You can simply right-click the layer entry in QGIS and select "Save as"" approach was right
But the "GEOMETRY=AS_WKT" in the OGR layer option was missing.
I may also be a good idea to convert the coordinate system to WGS 84, as CSV are usually expected not to be projected (and shapefile sometimes are)
You can simply right-click the layer entry in QGIS and select "Save as".
In the dialog, there's an option to save as "CSV".
There are plenty of options to refine the format of the generated CSV file, as well as there are many other file formats to choose from.
Update:
See here for a solution: https://gis.stackexchange.com/a/8846
Outdated Response:
It is possible, in a sort of roundabout way...
Open the attribute table for the layer you want to save.
Select all rows.
Copy the rows
Paste into a spreadsheet
Save the spreadsheet as a csv.
Unfortunately there is no way to do this directly in QGIS.
See here for more details:
https://gis.stackexchange.com/questions/8844/get-list-of-coordinates-for-points-in-a-layer/8911#8911

I notice world file is missing the zone paramter

I'm just trying to figure out how to create world file. I saw some explanation but I notice world file having the easting and northing values but not the zone value. So how the location of the map will be identified, or I'm missing something.
Thanking you.
The world file does specify numerical geographical location for an image, but it unfortunately does not contain any information about what coordinate systems is used.
Such information typically comes in a separate file with extension .prj and is defined usually with the WKT standard and via a unique EPSG code of the coordinate system.
To simplify the search for coordinate system definitions we created an online tool:
http://epsg.io/
There you can use simple search phrases and preview position of any coordinates on a map - and also download the .prj file mentioned above.
Because you have tagged your question with "maptiler" I expect you want to cut the map tiles from your geodata and world file with the MapTiler software.
The coordinate systems can be specified directly in MapTiler easily. See http://www.maptiler.com/how-to/coordinate-systems/

I can't seem to plot latitude and longitude points after I've added a shapefile. What went wrong?

I am trying to add a shapefile that is a map of Manhattan wards and then plot some latitude-longitude data points over this map. I'm new to ArcMap and GIS in general.
Here is exactly what I am doing:
I have a shapefile that shows Manhattan wards when I "Add Data" it into ArcMap. I then go to Geoprocessing -> ArcToolbox -> Data Management Tools -> Projections and Transformations -> Define Projection. I then input my .shp file and select NAD 1983 State Plane New York Long Isl FIPS 3104 (US Feet) for the coordinate system. After I do this, my shapefile displays just fine.
I then "Add Data" a .csv file which contains addresses and the latitude and longitude for these addresses. I then right-click on this layer and select "Display XY Data...". I then make the "X Field" latitude and the "Y Field" Longitude and use the same coordinate system as mentioned above. However, the points never display. I still only see the wards shapefile displayed. Both layers are present in the Layers menu, but only one is actually being displayed.
Alternatively, if I restart ArcMap and add the points first and display the XY data, I see that the points are displayed. After I add the shapefile, the shapefile does not display. I only see the points. It seems I can always display one thing but not the other.
Any thoughts on why this is happening?
I am using ArcMap version 10.2.0.3348 on a Windows OS.
I assume you are trying to overlay different spatial reference systems without telling arcmap which ones you use, so it cant reproject them to fit together.
When you say "latitude" and "longitude" you normally mean a geographic coordinate system like WGS84. Whilse X and Y often refer to a projected coordinate system like NAD. You defined NAD for both layers...I think you should define a geographic coordinate system for your CSV File, if it really contains geographic coordinates.
ArcMap uses the spatial reference system of the first layer which is added as the display SRS (you can change this afterwards for sure), thats why you saw your shapefile first and after restart and adding the points saw the points first.
If every layer has its SRS defined correctly, ArcMap will reproject them automatically to fit your display SRS. If you define the wrong SRS for one layer, Arcmap will do nothing for sure, because there is no need to reproject a NAD layer to NAD (although the coordinates have a completely different value domain and your points get drawed somewhere else....check this by right clicking on the CSV layer and "Zoom to Layer (extend)".
To make it more complicated: Because NAD83 and WGS84 rely on different geodetic datums, you have to transform. You find a predefined set of transformation parameters when you right click on "layers" in the "table of contents" on the left and select "properties". On the "coordinate system" sheet you see the "Transform" Button where you can select the transformation parameters which should be use to get from NAD83 to WGS84 and vice versa. A more detailed description can be found at this GIS SE

How to convert geographic data to CSV

I am trying to obtain accurate site geometry for a particular location in Autodesk Revit. The site in question is located near 19621 Waters Road, Germantown MD 20874-0000. The problem is that I can only import CSV or other comma delimited text, or a CAD format, into Revit, but height data for the region at the nessisary resolution is only available from USGS mational map thingey in ArcGrid, GeoTIFF, GridFloat, and BIL_16INT formats. I am working on a computer where (because of systemadmin stuff) I can't run any unapproved executables or anything, and my home computer doesn't have Windows, only Ubuntu. Does anyone know a way to convert the data to what I need, or know of a better whay to obtain this?
If your ARC GRID is an ascii file (not binary), don't worry about .asc and just open it in Notepad.
You will find there words xllcorner, yllcorner and cellsize, and values for cell centers. Keywords xllcorner and yllcorner are coordinates of the low left corner of the grid. (And you need to know what is the coordinate system of the file and if it is the same which you want to import as csv.)
Then you can calculate (for example in Excel) the coordinates of each cell center using cellsize. And then write all this in three columns x,y,value into a text file name.csv.
I have a routine that did thins using google earth, VBA and excel... You have to install the google earth developers package but it works pretty well- grabs images off GE and coordinates it with revit VIA a CSV file.
Revit Tricks Blogspot