Hi Jukka,
I have just tried to rename the fields with SQL. Here is the syntax:
"C:\gdal\ogr2ogr.exe" --config OSM_USE_CUSTOM_INDEXING NO -skipfailures -f
"ESRI Shapefile" -dialect sqlite -sql "select geometry, building as bldg,
'building:levels' as bldg_level, height as height from
Thank you Jukka.
Does this:
ogr2ogr.exe --config OSM_USE_CUSTOM_INDEXING NO -skipfailures -f "ESRI
Shapefile" -dialect sqlite –sql "select geometry, building as bldg, foo, bar
from multipolygons” output.shp input.osm
replace the part from the osmconfig.ini file:
# keys to report as OGR fields
Le vendredi 11 novembre 2016 16:53:02, Martin Landa a écrit :
> Hi,
>
> when trying to convert PostGIS data to Shapefiles I discovered strange
> issue. Input data:
>
> ogrinfo "PG:dbname=gismentors" ruian.kraje -so
> ..
> Layer SRS WKT:
> PROJCS["S-JTSK / Krovak East North",
>
Hi,
If you select geometry and attribute "foo" that's all you get. If you want
attribute "bar" as well you must do "select geometry,foo,bar from your_table".
That is plain SQL, you will find tutorials from the web.
-Jukka-
Lähettäjä: Djordje
Thank you Jukka.
I understand now why I need to repeat the same syntax 4 times (by only changing
multipolygon/multilinestrings/lines/points).
Can you explain this part as well please:
> You must edit the SQL parameter to include all the fields that you want to
> get into the result "select
Are the GDAL WMS documented examples for the Google and VirtualEarth tile
servers still correct?
Both Google and VirtualEarth documentation say you have to get a key. It
looks like things have changed since the GDAL WMS documentation was written
for Google and VirtualEarth.
Thanks in advance
Hi,
when trying to convert PostGIS data to Shapefiles I discovered strange
issue. Input data:
ogrinfo "PG:dbname=gismentors" ruian.kraje -so
..
Layer SRS WKT:
PROJCS["S-JTSK / Krovak East North",
GEOGCS["S-JTSK",
DATUM["System_Jednotne_Trigonometricke_Site_Katastralni",
(I apologize in advance for the cross-posting.)
We are considering holding the annual "C Tribe" Code Sprint in Daytona
Beach, FL and are currently considering two dates.
If you are interested in attending, then please confirm your interest
and the dates that work for you in this Doodle. We
Hi,
“Building” tag can exist in any layer. It is controlled with the osmconf.ini
file https://svn.osgeo.org/gdal/trunk/gdal/data/osmconf.ini
It is true that by default it is selected only for multipolygons. However, I
suppose that in the native OSM data the building tag is sometimes used also
Hi,
Ogrinfo and ogr2ogr usually accept the same syntax and therefore I gave the
ogrinfo example. I apologize, it can’t be self-evident for all GDAL users.
You can do the whole thing with one command like this:
ogr2ogr.exe --config OSM_USE_CUSTOM_INDEXING NO -skipfailures -f "ESRI
Shapefile"
Hi,
You can rename the fields with SQL
ogrinfo -dialect sqlite -sql "select geometry, building as bldg
from multipolygons" hamburg-latest.osm.pbf
Geometry Column = GEOMETRY
bldg: String (0.0)
Slight drawback is that you must include all the attributes in SELECT but
you can save the
11 matches
Mail list logo