Questions tagged [csv]
A comma-separated values (CSV) file stores tabular data (numbers and text) in plain-text form.
1,379
questions
79
votes
3
answers
114k
views
Converting Pandas DataFrame to GeoDataFrame
This seems like a simple enough question, but I can't figure out how to convert a Pandas DataFrame to a GeoDataFrame for a spatial join?
Here is an example of what my data looks like using df.head():
...
50
votes
4
answers
62k
views
Joining non-spatial CSV file to spatial data (shapefile) using QGIS
I have a CSV file which has postcode data in a field, but it is non-spatial e.g. no Easting and Northing.
I have a shapefile with postcode in a field and some additional data.
I want to join the ...
48
votes
8
answers
177k
views
Exporting attribute table to Excel from QGIS
I have seen all the questions for how to export an attribute table to Excel from QGIS, and I try all the answers like copy paste, CSV (in fact this I do not know where to find), but none seems to be ...
36
votes
7
answers
62k
views
Changing CSV layer attribute value from text to number in QGIS?
I read in a CSV file for linking to a .shp file.
All the variables that are just numbers came in as text.
How do I change the text variables to numeric in QGIS?
24
votes
4
answers
96k
views
Creating buffer in meters
Objective
Given a list of coordinates in longitude/latitude, stored as a .csv file, I want to create a buffer with distance of x km around those coordinates. (In case this is relevant, these ...
23
votes
6
answers
81k
views
Converting shapefile to CSV including attributes and geometry
I have a shapefile with 60k+ entries, all of which are polygons with corresponding attributes (acreage totals, landowner names, tax ID #s, etc.). What I ultimately need is a CSV file with all of ...
20
votes
1
answer
615
views
Performing QGIS modeler multiple raster calculations with data from external CSV?
I need to perform multiple calculations on a set of rasters based on values in a CSV metadata file.
I'm using the QGIS graphical modeler and can call a specific field in a CSV with the Table and ...
19
votes
5
answers
68k
views
How to export Polygons to CSV with coordinates?
I am very new to QGIS, so please bear with me.
I have a ".shp" file, which is contains a set of boundaries for suburbs of Australia. I opened it to QGIS and I would like to export it into a CSV file ...
19
votes
1
answer
2k
views
Converting line shapefile into CSV with nodes and links
Is there a way to convert a linear shapefile into a CSV file of the following format:
Node_1
Node_2
attribute_1
....
attribute_x
1
2
"hello"
....
567845.334
I have looked at GDAL/OGR2OGR ...
19
votes
1
answer
30k
views
Importing polylines and polygons into QGIS from CSV
I want to import a large number of polylines and/ or polygons into one one or more QGIS layers in order to plot the data. Each will only have simple attributes (e.g. name). I need to know:
The ...
19
votes
2
answers
782
views
Accessing existing instance of QGIS in stand-alone Python script
For my own data analysis pipeline, I am running a split screen setup with IPython notebooks on one side, generating variables from source data, pushing them to a CSV file which QGIS then reads/joins ...
18
votes
3
answers
7k
views
Join CSV file to shapefile using gdal/ogr
I have a shapefile with several attributes, for example "YEAR", "COUNTY", and "AREA". I also have a CSV file with more fields that I want in the shapefile, such as "...
17
votes
6
answers
22k
views
Preparing CSV files for use in ArcGIS Desktop?
How do I prepare CSV files for use in ArcGIS Desktop.
I ask because I have some troubles using CSV files because ArcGIS attributes wrong field types to my columns and also misinterprets special ...
17
votes
2
answers
28k
views
Creating CSV with geometry as WKT in QGIS (with choosing field delimiter)
Is there a way to choose the field delimiter when exporting a CSV with geometry as wkt in QGIS?
I have a shapefile with donut holes and I'd like to export it as a CSV. It's for a partner whose DB ...
16
votes
3
answers
13k
views
Exporting only certain columns to CSV file in ArcGIS for Desktop?
I've written a python script using arcpy which outputs a polygon feature class into a File Geodatabase. I have added a function to export the attributes to a separate CSV file. I am using the code ...
15
votes
5
answers
24k
views
Handling KML/CSV with geopandas - DriverError: unsupported driver: u'CSV'
I'm trying to import a dataset of UK postcode districts UK postcode districts from Google Fusion tables into geopandas with the aim of splicing it to a dataset of house prices.
The problem is that ...
15
votes
1
answer
30k
views
Exporting point layer from QGIS to CSV file
I have saved waypoints from my Garmin as gpx and have successfully imported them into QGIS.
Is there a way to now export the layers into a csv file with coordinates?
I've tried the export to csv but ...
14
votes
5
answers
6k
views
Reloading CSV file within QGIS
I use QGIS to illustrate the results from my Matlab simulation. Matlab produces a CSV file which is connected to a shapefile within QGIS.
At the moment I have to close and reopen QGIS to show the new ...
13
votes
5
answers
2k
views
How to reproject 500 CSV files efficiently and easily using QGIS?
I know, my question is similar to some old ones on this site.
I've a lot of CSV files (geo coordinates) to import to qgis (and then to convert them), and the usual way is not the best way to do it (...
13
votes
3
answers
21k
views
Convert huge XYZ CSV to GeoTIFF
I have a huge amount of data in the form of CSV containing UTM coordinates as X and Y and an elevation value as Z information. I need to convert these data into a DEM as GeoTIFF for further analysis. ...
12
votes
4
answers
2k
views
How to model a graveyard - one point per deceased or one per grave? [closed]
This is a continuation of my previous question about our project on how to economically get away with the implementaion of a graveyard in a GIS system…
On the graveyard we can find
Regular ...
12
votes
7
answers
11k
views
After joining shapefile with CSV file graduated symbols option unavailable in QGIS?
I have successfully joined data from a csv file to a shapefile in QGIS but for some reason I am having trouble symbolizing my data.
I want to use a graduated symbology however this option is not ...
12
votes
1
answer
8k
views
Writing vector layer to CSV file with geometry using PyQGIS?
I use Python try to write vector layer file to csv file with this code:
QgsVectorFileWriter.writeAsVectorFormat(mylayer, r'c:\temp\xyz.csv', "utf-8", None, "CSV")
It can export to xyz.csv but only ...
11
votes
1
answer
9k
views
Forcing ArcMap to recognize text field in CSV file
Related to Data-type detection in ArcGIS table loading
I have a CSV file which contains a mixture of numeric and text fields:
ID,Txt,Int,Dbl
12345,abc,45,56.78
12346,9,65,23.12
12347,10,66,23.13
...
11
votes
4
answers
13k
views
What ArcGIS geoprocessing tools support exporting tabular data to CSV?
I have found that most if not all geoprocessing tools that allow tabular output are limited to geodatabase tables and DBF files for supported output formats. Are there any that also support CSV output?...
11
votes
4
answers
23k
views
Listing all Feature datasets and feature classes from single Geodatabase into CSV
I have prepared a Python code and I got the following errors:
"Parsing error IndentationError: expected an indented block (line 11)"
and
"Runtime error Traceback (most recent call ...
11
votes
4
answers
34k
views
Join CSV file to shapefile
I wanted to join a CSV file to a shapefile.
When I identified a field to facilitate the join, e.g.,
map <- spChFIDs(map, as.character(map$ID))
it returned
Error in spChFIDs(SP, x) : lengths ...
11
votes
2
answers
4k
views
Loading CSV data table as Vector layer using PyQGIS
This might be a simple problem, but how does one load a simple two-column CSV with no associated geometric data?
I have given a couple of go's via QgsVectorlayer[delimited text, spatialite] types - ...
11
votes
3
answers
21k
views
What is XYZ format in QGIS?
Basic question, but I have been asked to export data to an XYZ format. Is this the same as CSV files.
I am using QGIS 1.8.0. So i am presuming i select the data I want to export, right click its ...
10
votes
6
answers
20k
views
ERROR 000212: Cannot create XY event source Failed to execute (MakeXYEventLayer)?
I have a csv file that is 133mb in size and has over 1.3 million lines of data. Each line of data has its own lat/long and I was wondering what would be the best way to display those points based off ...
10
votes
6
answers
7k
views
QGIS won't read table columns in CSV import on Mac OS
I am trying to import a CSV file into QGIS, but it ends up looking like my print screen below (program is in Swedish but in the preview window you can see how QGIS won't read my data correctly). I can'...
10
votes
3
answers
22k
views
Using pyshp to convert .csv file to .shp?
I am trying to understand how I can use the csv module in python to open a csv file in the same folder as the python script, and then create a shapefile using the shapefile module pyshp.
The csv file ...
10
votes
3
answers
933
views
How can I handle tables with 256+ variables?
I'm working with census data and downloaded several CSV files, each with with 600ish columns/variables. I'd like to store them all in a query-able database, but everything I've tried so far (MS ...
10
votes
3
answers
5k
views
Loading multiple CSV files into QGIS 2.10
How can I load multiple CSV files into QGIS with Longitude/Latitude already included in it.
I downloaded the "Load Them All" plug-in, however, the result loaded was converted as text files ...
10
votes
3
answers
7k
views
Drawing lines from two points in CSV using QGIS?
I have a CSV file where one line looks like this:
Duration, user, lat-start, long-start, lat-end, long-end
298, Casual,38.9101,-77.0444,38.91554,-77.03818
Each row in the CSV has two points and I ...
10
votes
1
answer
1k
views
Categorising point layer twice by size and form in QGIS
I have data points from a CSV-file that I opened in QGIS.
The points illustrate different power plants of solar, wind, geothermal, coal, oil, etc with different capacities within each class.
I already ...
10
votes
2
answers
4k
views
Import CSV as polygon in QGIS
I have a CSV file with the coordinates of the vertices of my polygons (in the picture they correspond to "left", "right", "top", "bottom"). Actually is a grid ...
10
votes
3
answers
17k
views
Table join with .csv file results in null fields after join
Similar to questions already asked about .dbf files, I'm attempting to join .csv files to a .gdb or shapefile coverage in QGIS. The tables as added to QGIS prior to the join look fine, but after the ...
9
votes
4
answers
22k
views
Python script to export .csv tables from GDB
I am very new to Python programming and have been tasked with writing a program to export a csv file from a file geodatabase feature class. The csv should contain only certain fields and the records ...
9
votes
3
answers
11k
views
Converting CSV file of WKT data to shapefile using ogr2ogr?
This question is related to Converting shapefiles to text (ASCII) files?.
I have a CSV file, with one column, where all the rows correspond to WKT POLYGON()'s:
WKT
POLYGON(...)
POLYGON(...)
...
I'm ...
9
votes
2
answers
11k
views
ogr2ogr keep geometry when converting to CSV?
Using ogr2ogr, how to keep the geometry when converting to CSV?
( Nothing relevant here: http://www.gdal.org/drv_csv.html )
$ ogr2ogr -f "CSV" MyLayer.csv MyLayer.geojson
Here is the begin of ...
9
votes
3
answers
19k
views
Seeking tool for converting JSON to GeoJSON or CSV
How do you convert a JSON file to a GeoJSON or a CSV file? I have a JSON file with lat/lon information, but how can I can convert this file to GeoJSON or CSV. I have found some online tools to convert ...
9
votes
1
answer
3k
views
Why are some columns not recognized as numeric even with CSVT?
I have problems importing a .csv file.
Some Values of the file are not supposed to be formated in text style, but in number style, thus i created an additional .csvt file like explained here.
Both ...
9
votes
1
answer
4k
views
How to keep leading zeros in csv file when working with QGIS
I'm new to QGIS, and Geographic Information Systems in general, and also have no experience with informatics.
I a have shapefile which works fine, and then I have a file in CSV format, and I try to ...
9
votes
1
answer
3k
views
Is there a QGIS alternative for ArcMap's Append (to Shapefile) Data management tool?
Is there something out there for QGIS that is similar to the Append Tool in ArcMap?
Reason I am looking:
I am currently working on a storm drainage project that involves GPSing Storm drain lids.
My ...
8
votes
4
answers
754
views
Importing grid layer from CSV in QGIS
In QGIS, I used the Create grid function to produce a grid. It produces an attribute table that looks something like that :
Now, let say I have a CSV file with the same attributes.
id
left
top
right
...
8
votes
4
answers
23k
views
How to export highlighted features from attribute table to an excel file?
When i selected some portion of the map in QGIS, in the attribute table the selected features gets highlighted...
How to export the highlighted features from attribute table to an excel file ...
8
votes
2
answers
14k
views
Spatially joining polygon fields onto point layer in QGIS
I have gridded depth points in CSV format that I'm trying to add other map data to, in additional columns. I've tried joining fields, hoping that I could link the shapefile data to the CSV, but when I ...
8
votes
3
answers
6k
views
QGIS 3.2 - Forcing column type when importing csv
I've got this csv file that I'm trying to import to QGIS 3.2. It's just a data table with no geometry attached.
When I just drag it from the Browser on the left-hand side, all the columns get ...
8
votes
1
answer
259
views
Importing CSV into QGIS with Python, Specific Parameters?
I would like to know where I can find a list of parameters that can be specified when importing a CSV into QGIS using python. The documentation I've found only shows a few options.
QGIS Cookbook
I ...