Questions tagged [csv]

A comma-separated values (CSV) file stores tabular data (numbers and text) in plain-text form.

Filter by
Sorted by
Tagged with
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(): ...
atkat12's user avatar
  • 1,549
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 ...
gisuser's user avatar
  • 545
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 ...
Po Po's user avatar
  • 841
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?
HealthMaps's user avatar
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 ...
Herr K.'s user avatar
  • 343
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 ...
Rikk's user avatar
  • 231
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 ...
HDunn's user avatar
  • 8,616
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 ...
ericbae's user avatar
  • 293
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 ...
dassouki's user avatar
  • 8,563
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 ...
Tim Fowler's user avatar
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 ...
ako's user avatar
  • 1,974
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 "...
Lincoln Mullen's user avatar
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 ...
Dspanes's user avatar
  • 1,401
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 ...
fgcarto's user avatar
  • 1,524
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 ...
Fezter's user avatar
  • 21.9k
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 ...
elksie5000's user avatar
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 ...
Peter Cornelissen's user avatar
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 ...
Edgar's user avatar
  • 141
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 (...
Raquel Ribeiro's user avatar
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. ...
Arne's user avatar
  • 815
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 ...
Patrick Van Den Noortgaete's user avatar
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 ...
Anneke's user avatar
  • 121
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 ...
Anubiz's user avatar
  • 121
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 ...
Stephen Lead's user avatar
  • 21.1k
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?...
blah238's user avatar
  • 35.8k
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 ...
user avatar
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 ...
user3915459's user avatar
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 - ...
Katalpa's user avatar
  • 871
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 ...
Ger's user avatar
  • 2,565
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 ...
Furlong's user avatar
  • 2,115
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'...
JohannaH's user avatar
  • 111
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 ...
kogia's user avatar
  • 101
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 ...
scoball's user avatar
  • 101
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 ...
user83721's user avatar
  • 115
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 ...
lindzcook's user avatar
  • 101
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 ...
Joehat's user avatar
  • 285
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 ...
AUS85's user avatar
  • 446
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 ...
KMT's user avatar
  • 161
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 ...
user35267's user avatar
  • 111
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 ...
Pris's user avatar
  • 1,251
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 ...
swiss_knight's user avatar
  • 10.2k
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 ...
Stefan's user avatar
  • 2,152
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 ...
Gideon's user avatar
  • 1,120
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 ...
João Santos's user avatar
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 ...
Shaun's user avatar
  • 91
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 ...
Pioupiou's user avatar
  • 183
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 ...
siva krishna's user avatar
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 ...
dez93_2000's user avatar
  • 1,057
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 ...
Felipe D.'s user avatar
  • 2,411
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 ...
cndnflyr's user avatar
  • 3,392

1
2 3 4 5
28