2

I have a CSV with data (no location, no lat/long). I need to load that CSV into QGIS and create a point for each feature.

I've trying for an hour without success..

I guess there must be a way to create a new empty SHP, upload CSV data into the SHP somehow and after that assign one point in the map for each element..but I can't find a way to do this in QGIS..

  • Quick Shot: Try Layer > add Layer > Add Vektorlayer and choose your .csv as source. This imports the table data. Assigning a location to your data is another problem I have no quick answer to. – Papierwolf Feb 17 '16 at 9:48
  • My approach: I imported the csv to a postgis table and added a geometry colum with the same point (wherever) for every element. After that I am moving the points where I want to using QGIS. – Egidi Feb 17 '16 at 12:07
  • Are you looking to put the points in a specific location or can they be located anywhere as long as they have a coordinate? – Kingfisher Feb 17 '16 at 12:59
  • I am loking to put them in their location. I have churches, schools, buildings etc, but I only have their names and I have to geolocate them. – Egidi Feb 17 '16 at 13:44
  • @Egidi do you have addresses for these locations, or are you going to digitize them manually? – DPSSpatial Feb 29 '16 at 23:03
1

I've used the following in similar situations:

  • Open your CSV file in OpenOffice/Excel and add an extra, named column. Fill the column with sequential numbers (e.g. 0-200) using the appropriate auto fill.

  • Import the CSV with Layer > Add layer... > Add Delimited Text Layer... with the No geometry (attribute only table) option selected.

  • Zoom to your area of interest (I assume you have an aerial image or similar) and create a polygon over or close beside it – whatever will make the final step easiest. You can create a temporary scratch layer for this step.

  • Use the Vector > Research Tools > Regular Points... tool, with your temporary polygon as an Import Boundary Layer. For grid spacing, set Use this number of points to your requirements (e.g. 200). Output and add the results to the project.

enter image description here

  • Discard the temporary polygon.

  • Perform a join between your CSV layer and the new point layer with Layer > Layer Properties... > Joins using the ID column in the point layer and the numbered column in your CSV as the Join field.

  • Label the layer to help identify what they should represent in your area of interest, edit the layer and drag the points to their desired location. Save As... the point layer when complete.

Not an ideal solution, but until QGIS has an option for adding geometry to non-spatial CSVs it may speed things up for you...

| improve this answer | |
  • Thanks for you answer. I am finally using a similar workaround: I add the CSV to PostGIS and in the Geometry Column I add in every record a point (Located in the middle of the are of interest). Same point for each record. After that I start draging the points to the desired location. – Egidi Mar 3 '16 at 13:45
  • @Egidi I think that's your best path forward... similarily, you could create a spreadsheet with the locations and addresses, convert to CSV, then geocode them using the MMQGIS google geocoder... – DPSSpatial Mar 3 '16 at 17:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.