Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>You can convert a CSV file into any OGR supported format. All you need is a header file for the CSV file. Here you have an example:</p> <pre><code> &lt;ogrvrtdatasource&gt; &lt;ogrvrtlayer name="bars"&gt; &lt;srcdatasource&gt;bars.csv&lt;/srcdatasource&gt; &lt;geometrytype&gt;wkbPoint&lt;/geometrytype&gt; &lt;layersrs&gt;EPSG:4326&lt;/layersrs&gt; &lt;geometryfield encoding="PointFromColumns" x="longitude" y="latitude"&gt; &lt;/geometryfield&gt; &lt;/ogrvrtlayer&gt; &lt;/ogrvrtdatasource&gt; </code></pre> <p>In the datasource field you set the CSV file name. In your case, you have points, so the example is ok. The field layersrs indicates the projection of the coordinates. If you have longitude and latitude, this one is ok. The geometryfields must contain the x and y properties, that define the columns in the CSV file that containt the coordinates. The CSV file must have a first line defining the field names. Save the file with a <em>.vrt</em> extension.</p> <p>Once you have this, use the ogr2ogr program, which you have if GDAL is installed. If you want to convert the file to a Shapefile, just type in a console:</p> <pre><code>ogr2ogr -f "ESRI Shapefile" bars.shp bars.vrt </code></pre> <p>If your question is what to do with the data, you can check the <a href="http://www.gdal.org/gdal_grid.html" rel="nofollow">gdal_grid</a> utility program, which converts scattered data (as yours) to raster data. You can use the CSV with the vrt header file as the input, without changing the format.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload