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

learn more… | top users | synonyms

28
votes
4answers
15k 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 ...
18
votes
5answers
23k 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?
15
votes
3answers
9k views

Preparing CSV files for use in ArcGIS for Desktop?

I wonder if there are any recomendations how to properly prepare CSV files for use in ArcGIS for Desktop. I ask because I have some troubles using CSV files because ArcGIS attributes wrong field types ...
14
votes
4answers
31k views

How to convert .shp to .csv including attributes AND geometry?

I have a .shp file 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 ...
12
votes
2answers
9k views

How to export only certain columns to a CSV file in ArcGIS?

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 ...
11
votes
4answers
1k 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 ...
11
votes
2answers
3k 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 ...
10
votes
4answers
10k 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?...
10
votes
3answers
631 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 ...
9
votes
4answers
584 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 (...
9
votes
3answers
23k 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 ...
9
votes
2answers
8k views

Using the python shape library: pyshp - how 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 ...
9
votes
1answer
683 views

Why are some columns not recognized as numeric even though I have a 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 ...
8
votes
6answers
18k 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 ...
8
votes
1answer
11k views

Create a csv with geometry as WKT in QGIS (and choosing the field delimiter)

Is there a way to choose the field delimiter when exporting to 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 ...
7
votes
4answers
18k 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 ...
7
votes
1answer
8k views

Is there a way to export a point layer from QGIS to a 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 ...
7
votes
1answer
8k views

Import polylines and polygons into QGIS from CSV

I'm assuming this is a simple question, though my efforts have not yet found the answer! I want to import a large number of polylines and/ or polygons into one one or more QGIS layers in order to ...
7
votes
1answer
1k views

Updating Fusion Table layers from csv files using python

I'm trying to use Python to take csv files and use them to update (or replace) tables in Fusion Tables. I found the "Python client library for Fusion Tables" on googles' site and downloaded them as ...
6
votes
2answers
72 views

Import unknown CSV file format in QGIS

I have a CSV data sheet that I would like to import in QGIS as a set of polygons. The CSV file contains a column of geometries with long lines of data (see example below). Can somebody tell me how I ...
6
votes
6answers
1k 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'...
6
votes
1answer
4k views

How to convert coordinates in a .csv into another CRS in QGIS

How can I convert coordinates which are stored in a csv and in a certain format in a different CRS, i. e. I want to convert GK 3 (EPSG:31467) into WGS 84 (EPSG:4326). I am using QGIS and already ...
6
votes
3answers
5k 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 ...
6
votes
2answers
3k views

Using SearchCursor to access & export values in a raster table

I am desperately trying to export the values in a raster table to a .txt file. I've seen some other folk post about this, but for some reason can't get the code to work in my case. I have a raster, ...
6
votes
1answer
378 views

ogr2ogr csv conversion with latlon in one column

I have a csv with "lat\,lon" in a single column. I am trying to convert it with ogr2ogr to another format, and cannot figure out how to format the VRT file to accept this format. I cannot do ...
6
votes
1answer
869 views

How to Convert a Line Shapefile into a CSV with Nodes and Links?

Is there a way to convert a linear shape file 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 ...
6
votes
1answer
739 views

How can I reload a 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 ...
6
votes
3answers
621 views

How can I get ArcMap 10.2 to recognize a csv column as float and not int?

I am trying to show a .csv file (2 columns, 291 rows) in ArcMap 10.2 using Catalog window to drag the .csv file into ArcMap. The second column of the .csv is a floating point number (range is [0-1]), ...
6
votes
1answer
1k views

How to write vector layer to csv file with geometry by PYTHON?

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 ...
6
votes
0answers
91 views

Perform 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 ...
5
votes
3answers
2k views

How to identify feature vertices that are part of a donut hole in ArcGIS 10?

I´m exporting the coordinates of polygon vertices to a CSV-File using the "Feature Vertices to Points" and then the "Export feature attributes to ASCII" tools. Some of these polygons have holes (...
5
votes
4answers
4k views

Exporting list of Feature Classes to CSV using ArcPy and Python?

I am successfully using the follow script import arcpy from arcpy import env import os env.workspace = ("WORKSPACE") fcList = arcpy.ListFeatureClasses() print fcList to export feature class names ...
5
votes
3answers
2k views

How to read Alphanumeric value when importing csv location file to ArcGIS?

So I am importing a csv file to ArcGIS and it has a bunch of alphanumeric values.. e.g. Attribute ID contains values such as 101, 101A, 101B etc ...the problem is when i am importing the csv to ...
5
votes
1answer
2k views

ArcGIS 10. Convert dbf to csv or similar in ArcPy without cursors

I have many dbf's created by the Spatial Analyst Sample tool. I would like to convert those dbf's into csv's or space delimited (or any text for that matter). I can't seem to find the ArcPy equivalent ...
5
votes
1answer
457 views

Is there a free dataset of historical geocoordinates of ancient cities and places?

Is there a freely available dataset (csv, geojson, topojson, etc.) with geocoordinates of ancient cities, for example of the Roman Empire? Ideally with additional information like population size? I'...
5
votes
2answers
831 views

OGR to read from oracle, and then write a CSV

I need to read an Oracle (not spatial) table with OGR. I have no problem with ogrinfo. I use this command: ogrinfo -ro OCI:user/password -sql "select * from HR.EMPLOYEES" I have this kind of ...
5
votes
3answers
145 views

Modifying CSV file in QGIS before joining it to shapefile?

I've imported a Delimited Text File that I want to join to a shapefile. Unfortunately, the join field has a ' character before the actual string. I wanted to delete that character, but I can't ...
5
votes
2answers
2k views

How to draw lines from two points in a CSV?

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 ...
5
votes
2answers
59 views

QGIS Import CSV variable conversion

I tried to import CSV files to QGIS using the "Add delimited text layer" feature. For some reason, some of the numeric variables became QString. I need them to become integer so I could perform ...
5
votes
1answer
678 views

Convert a pandas DataFrame to a 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(): ...
5
votes
2answers
1k views

Loading data onto PostGIS using KML files with attibute data

So, I have a kml file which contains 317 data points (317 polygons and the respective 317 names). The kml file also contains attribute data which pops up in a bubble on Google earth with about 12 ...
5
votes
1answer
2k views

OGR Shapefile to CSV: Using Python to get WKT for multipart Polys.

Using ogr2ogr and python, I'm running into a wall with trying to create a csv with WKTs for a shapefile that contains multipart polygons. Currently this is this code I'm using (found it on interweb): ...
5
votes
1answer
550 views

How do I avoid text field truncation when saving a table join?

Using QGIS I've joined tabular text data (all in fields of less than 255 characters) to a shapefile via a CSV file. All looks good in the joined table but when I save to a new shapefile to make the ...
5
votes
2answers
525 views

Efficient way to use a CSV to Define a Feature Class

I was provided an Excel Spreadsheet which had the definitions of fields for a feature class. There were several worksheets in the file, each containing field definitions for different feature classes....
5
votes
1answer
2k views

Is there a source for free CSV files with geo data and other desired fields? [closed]

I'm writing some software components that process geospatial data. The input data is a CSV with general columns (e.g. name) and geo columns (e.g. city, lat or zip). I would like to test these ...
5
votes
1answer
1k views

How do you format an OGR VRT file to best convert a CSV to KML?

I am attempting to get a nice KML for simple review of POI/geocoding from a CSV. I a using ogr2ogr and a vrt. You can see the vet file below, with two attempts to get this right. Basically, the issue ...
4
votes
9answers
22k views

Creating shape file from file with coordinates

How can I make a shape file of an csv file with coordinates?
4
votes
2answers
2k views

Join a 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 POPULATION. Both the shapefile and the CSV ...
4
votes
3answers
5k 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 ...
4
votes
4answers
4k views

Bulk convert DBF to CSV in a folder ArcGIS 10.1 using Python

I would like to convert 1000 dbf files to CSV. All dbf files are in one folder and they have sequential names (S:\output_tables\tcb1.dbf, S:\output_tables\tcb2.dbf, S:\output_tables\tcb3.dbf, up to S:\...