Questions tagged [ogr]

The OGR Simple Features Library is a C++ open source library (and commandline tools) providing read (and sometimes write) access to a variety of vector file formats including ESRI Shapefiles, S-57, SDTS, PostGIS, Oracle Spatial, and Mapinfo mid/mif and TAB formats. OGR is a part of the GDAL library

The OGR Simple Features Library is a C++ open source library (and commandline tools) providing read (and sometimes write) access to a variety of vector file formats including ESRI Shapefiles, S-57, SDTS, PostGIS, Oracle Spatial, and Mapinfo mid/mif and TAB formats.

OGR is a part of the GDAL library

199 questions
0
votes
1 answer

ogr2ogr to import GML with spatial and non-in SQL Server

I am trying to use ogr2ogr to import GML file into SQL Server Spatial. I successfully import features with geometry, but I have few without geometry column. How can I import all of them? EDIT: I reinstalled GDAL, installed latest, works fine, but…
Aleksandar
  • 1,123
  • 17
  • 36
0
votes
0 answers

OGR Header Field Length

I'm trying to convert a csv file to an ESRI Shapefile with OGR in Python. The problem is obviously that my header entries are too long for the default field size: Warning 6: Normalized/laundered field name: 'SEEHOEHE [m]' to 'SEEHOEHE [' I want to…
user3017048
  • 2,201
  • 3
  • 15
  • 30
0
votes
1 answer

GDAL 1.11 no vector support?

I was trying to look at the OGR api in GDAL, and was following the tutorial here: http://www.gdal.org/ogr_apitut.html. I kept getting an undefined reference to pretty much everything. I've installed from source the latest version (1.11) on my…
sovemp
  • 1,384
  • 1
  • 11
  • 30
0
votes
1 answer

Error using OGR to figure out if a pixel center is inside a polygon

I’m trying to develop (using C++ - MSVS 12.0) a function that discover which pixels (from a raster image) have its center inside a polygon (previously populated using a shapefile). I’m using GDAL 1.11.0 (just installed, using devinstall) building…
0
votes
1 answer

Is it possible to pass system variables to ogr2ogr in batch file

My organization uses batch files to perform queries on our database, and I am presented with a situation in which I need to perform a query which would be much too large to do all at once. So what I've done is modified a batch file to loop through a…
brock
  • 355
  • 1
  • 3
  • 10
0
votes
1 answer

rmetrics - test if longitude and latitude coordinates are on land or sea

I have a series of longitudes and latitudes for earthquakes. I would like to be able to split them into ones that are over land and ones that are over sea. Is there an r function to do that?
patzoul
  • 39
  • 1
  • 6
0
votes
2 answers

Run-time error : Access violation writing loacation while deleting a pointer in dynamic memory allocation

I have written this code in order to show line shapefiles in an opengl window. In fact it's the code Rendering Shapefile in OpenGL here in code-project, but I'm making some changes on it in order to read the shapes with the OGR library not shapelib.…
0
votes
1 answer

How to retrieve the field name of a ShapeFile feature field?

I am using gdal-ruby to parse ESRI ShapeFiles like in this demo. I want to iterate through all features in order to push the field values into a database. However, I cannot find out how to retrieve the name of each field which I need to match the…
JJD
  • 44,755
  • 49
  • 183
  • 309
0
votes
1 answer

read ESRI FileGeoDataBase with ogrinfo / sql filter on date field

I can read my FileGDB (ArcGIS 10.1) with GDAL-library (1.10) using ogrinfo and sql filtering datasets by FID ogrinfo "...\test.gdb" -sql "SELECT edited FROM 'plz_simple_copy' WHERE fid = 1864" --debug on -dialect OGRSQL or this way by…
0
votes
1 answer

How to select areas from openstreetmap in django?

I would like to build a django webapp. One part of this should allow the user to interactively select geographic areas from a map. The map should come from openstreetmap, and the user should be able to do different kinds of…
andreas-h
  • 9,199
  • 17
  • 52
  • 69
0
votes
0 answers

OGR GetX returns always zero

I am trying to get the first x-coordinates of a polygon. However I only get zero in return. What could cause that? import os, sys, gdal, ogr from gdalconst import * driver = ogr.GetDriverByName('ESRI Shapefile') testarea =…
ustroetz
  • 4,962
  • 13
  • 39
  • 69
0
votes
1 answer

OGR Distance Units

I am using OGR Distance in Python to determine the shortest distance between a point and a line. My results are completely different then the ones I get using QGIS. I assume the units OGR uses depend on the coordinate system? Could it be that OGR…
ustroetz
  • 4,962
  • 13
  • 39
  • 69
0
votes
1 answer

Why is bash/ogr outputting shapefiles into individual folders within the output directory?

I'm new to bash/ogr and can't seem to figure out why this loop outputs shapefiles into individual folders within the output directory. Here is my…
JPD
  • 2,011
  • 5
  • 18
  • 25
0
votes
1 answer

Can Mapnik infer styles from KML?

I am trying to use the Mapnik C++ API to visualize KML data in my application. I can't see how to get the style information out of the OGR datasource into the map. In any case, I am a bit surprised that it does not Just Happen. So, two qeustions: 1.…
Pete
  • 1,091
  • 1
  • 8
  • 20
-1
votes
1 answer

How to have continuous features for a shapefile and get rid off the wrapdateline?

How to have continuous features for a shapefile ? I mean NOT cut by the dateline to respect [-180:180] longitude excursion that I do not want to respect. Here is an example where I display the Russia shapefile in a leaflet map. In fact I would like…
PBrockmann
  • 462
  • 5
  • 10
1 2 3
13
14