Re: [gdal-dev] OGR SQL CAST geometry example

2024-05-30 Thread Dan Jacobson via gdal-dev
Alas, even for MULTIPOINT, as there are no facilities for extracting from aggregates, not even ST_Dump, in the end all one can do is $ ogrinfo 0.lines.kml -al | perl -nwle \ 'if(/LINESTRING.*\((.*)\)/){print for split /,/, $1}' -100.79005679 36.38022 1000 -100.79008013 36.38531 1

Re: [gdal-dev] OGR SQL CAST geometry example

2024-05-30 Thread Dan Jacobson via gdal-dev
$ ogrinfo 0.lines.kml -q -dialect SQLITE -sql \ 'SELECT ST_PointN(GEOMETRY, generate_series(1, ST_NPoints(GEOMETRY))) FROM "0"' ERROR 1: In ExecuteSQL(): sqlite3_prepare_v2( no such function: generate_series ___ gdal-dev mailing list gdal-dev@lists.

Re: [gdal-dev] OGR SQL CAST geometry example

2024-05-30 Thread Dan Jacobson via gdal-dev
> "ER" == Even Rouault writes: ER> you can't do operations on geometries with OGR SQL... OK, I'll try it. Thanks. The page should still have an example of actual use of Casting ... POINT[Z], LINESTRING[Z] Without examples people will try things like POINTZ, "POINTS[Z]"

[gdal-dev] OGR SQL CAST geometry example

2024-05-30 Thread Dan Jacobson via gdal-dev
Hi. I will add an example to https://gdal.org/user/ogr_sql_dialect.html#changing-the-type-of-the-fields showing users how to e.g., CAST LINESTRING Z to POINTS Z, e.g., to extract the points from: $ ogrinfo 0.lines.kml -q -sql 'SELECT "_ogr_geometry_" FROM "0"' Layer name: 0 OGRFeature(0):1 LINEST

Re: [gdal-dev] Gettin' started: WMTS -> gdal2tiles

2020-05-20 Thread Dan Jacobson
Or, how would I download a few tiles, from openstreetmap, say near 24,121 lat/lon? Yes, https://github.com/OSGeo/gdal/issues/2052#issuecomment-628650934 but of course works for me, but is black. I suppose there is no way to pipe this into gdal2tiles, so I will save it as a separate file(s) first.

[gdal-dev] Gettin' started: WMTS -> gdal2tiles

2020-05-14 Thread Dan Jacobson
I have got this far: $ wget https://maps.nlsc.gov.tw/OpenData/wmts $ gdalinfo wmts I want to use $ gdal2tiles on one of its layers, for a few km. wide rectangle, for offline browsing. So I need to somehow save the tiles from WMTS, and then feed them into gdal2tiles. Yes I read https://gdal.org/d

Re: [gdal-dev] Export to Geopackage

2019-03-14 Thread Dan Little
Set `-nlt` ? On Thu, Mar 14, 2019 at 10:12 AM Dan Little wrote: > > Set `-nlt` ? > > On Thu, Mar 14, 2019 at 10:12 AM Randal Hale > wrote: > > > > If I export a postgis table to geopackage: > > > > ogr2ogr -f GPKG export.gpkg PG:"host=gis1 user=r

Re: [gdal-dev] Does "OGR_STYLE from rivers" mean it will read rivers.ofs ?

2016-07-02 Thread 積丹尼 Dan Jacobson
Maybe http://www.gdal.org/ogr_feature_style.html is just a framework and not something that is implemented anywhere? Are there any examples of anybody using LABEL(f:"Times New Roman",s:12pt,t:{text_string}) to print anything anywhere? ___ gdal-dev mailin

Re: [gdal-dev] Does "OGR_STYLE from rivers" mean it will read rivers.ofs ?

2016-07-02 Thread 積丹尼 Dan Jacobson
All I want to do is try the various Label Placement Modes seen in http://www.gdal.org/ogr_feature_style.html , given my LineString of .csv Lon/Lat points that I stripped out of my .kml. Surely there is a way to attach Label Placement Modes to a LineSrting and then output it to some .png etc. file,

Re: [gdal-dev] Does "OGR_STYLE from rivers" mean it will read rivers.ofs ?

2016-07-02 Thread 積丹尼 Dan Jacobson
But this applies the style to all the points in the line, but I just want to apply it to the line itself. And then how can I finally print the result to a .png file? Convert to .shp and view in qgis? But my .shp ended up with no points in it. ___ gdal-de

Re: [gdal-dev] Does "OGR_STYLE from rivers" mean it will read rivers.ofs ?

2016-07-02 Thread 積丹尼 Dan Jacobson
I finally gave up and stipped the KML data into a .csv and finally was able to (according to ogrinfo) successfully attach styles to it with this .vrt file: road.csv wkbLineString WGS84 SELECT *,'PEN(c:#FF00FF,w:10px)' AS OGR_STYLE FROM road _

Re: [gdal-dev] Does "OGR_STYLE from rivers" mean it will read rivers.ofs ?

2016-07-02 Thread 積丹尼 Dan Jacobson
I failed miserably at adding ANY style to a shapefile. $ ogrinfo -al -q zk2.shp|colrm 66 Layer name: zk2 Metadata: DBF_DATE_LAST_UPDATE=2016-07-02 OGRFeature(zk2):0 Name (String) = zaokeng main road 中45市道 descriptio (String) = (null) timestamp (Date) = (null) begin (Date) = (null) end

[gdal-dev] Does "OGR_STYLE from rivers" mean it will read rivers.ofs ?

2016-07-02 Thread 積丹尼 Dan Jacobson
http://www.gdal.org/ogr_feature_style.html says Here is what one of those .OFS files could look like: OFS-Version: 1.0 StyleField: "style" DefaultStyle: PEN(C:#00FF) road: PEN(c:#FF,w:5px) lake: BRUSH(fc:#FF);PEN(c:#00) campsite: SYMBOL(c:#0

Re: [gdal-dev] R: Problem using ogrlineref

2016-07-01 Thread 積丹尼 Dan Jacobson
Well OK but the Debian guy closed all my bug reports instantly, and on the man page you will need to give full examples, including input file content, before any of this becomes understandable. Thanks. ___ gdal-dev mailing list gdal-dev@lists.osgeo.org h

Re: [gdal-dev] R: Problem using ogrlineref

2016-07-01 Thread 積丹尼 Dan Jacobson
I just have a single . I want to put kilometer markers along it. That is all I am trying to do. ___ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev

Re: [gdal-dev] R: Problem using ogrlineref

2016-07-01 Thread 積丹尼 Dan Jacobson
I am trying to use the ogrlineref command. I can't even understand its man page. Maybe it only works on shapefiles. Maybe it only Seg Faults. How can I get the locations of the kilometer markers given only this KML: zaokeng main road 中45市道 1 120.86817,24.17922,0.0 120.86816,24.17922

Re: [gdal-dev] RFC 44: JSON/XML output for ogrinfo/gdalinfo

2013-11-19 Thread Dan Little
ep all output formats in line.   I started out supportive, but the more I think about the approach the less keen I am. Best regards, Frank On Tue, Nov 19, 2013 at 8:42 AM, Howard Butler wrote: All, > >Dan Little and myself would like to put forward an RFC proposing -xml and >-json

[gdal-dev] Multifile ArcGrid Issue

2013-09-12 Thread Dan Lewis
Hi, I'm trying to pull elevation data from the GMTED2010 Global Grids, which are distributed as ESRI ArcGrids ( http://topotools.cr.usgs.gov/GMTED_viewer/gmted2010_global_grids.php). Here's a minimal program that illustrates my problem: int main() { GDALDataset *poDataset; GDALAllRegis

Re: [gdal-dev] [BULK] Re: Dissolve shapefile using GDAL/OGR

2013-07-25 Thread Dan Strobridge
shapes_polygons "Polygon Dissolve" -POLYGONS=infile.shp -DISSOLVED=outfile.shp -FIELD_1=combo -FIELD_2=zone -FIELD_3=val -DISSOLVE=0 Dan -- View this message in context: http://osgeo-org.1560.x6.nabble.com/gdal-dev-Dissolve-shapefile-using-GDAL-OGR-tp5036930p5068800.html Sent from the

Re: [gdal-dev] [BULK] Re: Dissolve shapefile using GDAL/OGR

2013-07-19 Thread Dan Strobridge
ile specified. GDAL 1.7.3, released 2010/11/10 Thanks so much, Dan From: Even Rouault [via OSGeo.org] [mailto:ml-node+s1560n5067676...@n6.nabble.com] Sent: Friday, July 19, 2013 2:01 PM To: Strobridge, Daniel M. Subject: [BULK] Re: Dissolve shapefile using GDAL/OGR Le vendredi 19 juille

Re: [gdal-dev] Dissolve shapefile using GDAL/OGR

2013-07-19 Thread Dan Strobridge
that would test whether it's a Spatialite/Geos installation problem or simply a bug? Thanks, Dan Strobridge + ogr2ogr -append test6.shp poly.gmt --debug on -dialect sqlite -sql select ST_Union(Geometry),zone from poly GROUP BY zone OGR: OGROpen(poly.gmt/035FC9C0) succeeded as GMT. Shape: DBF C

Re: [gdal-dev] MapInfo TAB with WindowsLatin1 into Spatialite

2012-01-19 Thread Dan Putler
://recode.progiciels-bpi.ca/index.html Dan On 01/19/2012 01:48 AM, Jukka Rahkonen wrote: Hi, My MapInfo TAB files have attributes with WindowsLatin1 encoding. Direct conversion with ogr2ogr from Mapinfo formta into Spatialite seems to give wrong encoding in the Spatialite database. I have not discoverd any

Re: [gdal-dev] can not debug gdal1.8.1 at visual studio 2008

2011-11-16 Thread Dan Homerick
. Under some circumstances, I think that cleaning may be required if going from a non-debug build to a debug build. - Dan On Wed, Nov 16, 2011 at 6:46 AM, Dan Homerick wrote: > The message you're seeing is because Microsoft doesn't include debug > information for their ODBC d

Re: [gdal-dev] can not debug gdal1.8.1 at visual studio 2008

2011-11-16 Thread Dan Homerick
certainly something besides that message. - Dan On Wed, Nov 16, 2011 at 3:47 AM, mrym wrote: > Hi, > i've downloaded gdal1.8.1 and builded it with > nmake /f makefile.vc DEBUG=1 > nmake /f makefile.vc install > nmake /f makefile.vc devinstall > > everything was fine till

Re: [gdal-dev] include paths and cmake

2011-11-04 Thread Dan Homerick
one it makes your development environment much easier to set up, and configuration files easier to maintain. Cheers, - Dan P.S. If you really want the interface headers to be easy to include, move the commonly used interface headers into the new gdal directory. Since the *.cpp files will all use rela

Re: [gdal-dev] include paths and cmake

2011-11-04 Thread Dan Homerick
listed. In my experience, making the installed paths different than the source tree has little added value for the user, while adding developer headache. The user doesn't generally need to include very many files, and those files tend to be near the root of the tree anyways. Cheers, - Da

[gdal-dev] Patch submission & development questions

2011-10-30 Thread Dan Homerick
has a more formal testing procedure, I'll be happy to write additional tests for whatever testing framework is being used. Cheers, - Dan ___ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev

[gdal-dev] Auto-selection of geometry column for MS SQL Server is not restrictive enough

2011-10-26 Thread Dan Homerick
hich naturally led to errors. This was despite NOT using "OGRSQL" as the dialect. There doesn't appear to be any interface to specify which, if any, column should be used as the GeomColumn -- am I (hopefully!) just overlooking something?

Re: [gdal-dev] Distinguish between empty result and error with OGRDataSource::ExecuteSQL

2011-10-26 Thread Dan Homerick
On Tue, Oct 25, 2011 at 7:54 PM, Frank Warmerdam wrote: > On 11-10-25 04:50 PM, Dan Homerick wrote: >> The ExecuteSQL method returns NULL when an error occurs, or if the >> statement result is just empty... > > The normal approach to distinguishing would be to call CPL

[gdal-dev] Distinguish between empty result and error with OGRDataSource::ExecuteSQL

2011-10-25 Thread Dan Homerick
e supported for all the various SQL drivers? Thanks for any guidance, - Dan ___ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev

Re: [gdal-dev] Integer overflow issue in ogr2ogr

2011-03-23 Thread Dan Putler
problem. On 03/23/2011 04:33 PM, Dan Putler wrote: All, I'm working with the topological faces from the 2010 Tiger shapefile data. Some of the faces are huge in Alaska (over 2147483647 meters^2, which exceeds the size of a signed 32 bit integer). In the block face attribute table the area of

[gdal-dev] Integer overflow issue in ogr2ogr

2011-03-23 Thread Dan Putler
d from the Ubuntu GIS repository (1.8.0 has not made it to the Ubuntu GIS repository yet). My question really is whether there is a work around, say processing the file beforehand in a way that converts the large integers to double precision values. Dan __

[gdal-dev] Is it possible to test if GDAL has been built with GEOS in a python script

2011-03-08 Thread Dan Putler
Hi all, As the message heading indicates, I am hoping to run a check within a python script to determine if GDAL on a machine has been built with GEOS support, and exit if it hasn't. Looking at inspect.getmembers( gdal ) suggests that I'm out of luck, but I wanted to confirm t

[gdal-dev] Python bindings to force geometry collections to mulitpoint, multipolygon, multiline

2011-03-03 Thread Dan Putler
All, I am currently running gdal 1.7.3, and it appears that in this version the geometry factory methods to force a geometry collection to multipoint, etc. aren't exposed to Python. Am I wrong? If not, are they exposed in gdal 1.8? Dan ___

Re: [gdal-dev] grouping shapefiles

2010-10-19 Thread Dan Putler
. An "open" format that would do what you want can be done using SpatiaLite: http://www.gaia-gis.it/spatialite/. Dan On 10/19/2010 11:37 AM, Jayesh Chaudhary wrote: I know I can merge shapefiles using ogr2ogr but is there a way to group them? So that each layer can be separate and w

[gdal-dev] Re: nodata - mask question

2010-02-23 Thread Dan Stahlke
t the nodata value, and then outputs a WKT file and a mask file. You can then use the mask to cut things out using ImageMagick or netpbm, or you could probably turn it into a mask band using GDAL's VRT format. - Dan ___ gdal-dev

RE: [gdal-dev] Re: Add GCP's to a file

2010-02-19 Thread Dan Greve
Question on the -gcp option in gdal_translate. If i want to use it to specify the geographic referencing of the four corners do i need to specify the center of the pixel, or the UL of the pixel. (e.g. -gcp 0 0 34 115 OR -gcp 0.5 0.5 34 115 ) Dan Greve

Re: [gdal-dev] getting "FL" (filelength) metadata field out of NITF file header

2009-12-07 Thread Dan
Thanks, Frank. In case anyone has this question and stumbles on this, the FL field is stored in bytes 342 - 354 (0 based) in the NTF file, so can be easily read and parsed manually. I'll keep using GDAL for all the other stuff though! :-) Dan On Mon, Dec 7, 2009 at 3:55 PM, Frank Warm

[gdal-dev] getting "FL" (filelength) metadata field out of NITF file header

2009-12-07 Thread Dan
NITF spec, but this field is not in the set of values passed back from this command, or at least it doesn't come back using the stock command. Is there another way to get the "FL" data back from a NITF file using GDAL? Thanks in advance, Dan

[gdal-dev] What can OGR do with SpatiaLite files at this moment and in the near future?

2009-10-24 Thread Dan Putler
files? My final question is more on the FWTools front, and that is whether the current Windows version of FWTools has a build of the GDAL/OGR library that has both the SQLite and PostGIS drivers included? Dan -- Dan Putler Sauder School of Business University of British Columbia

[gdal-dev] Problem using VSIMem to open VRT dataset

2009-06-25 Thread Dan Greve
with each GDAL version upgrade. -- Dan Greve -- Palm Bay, FL _ Hotmail® has ever-growing storage! Don’t worry about storage limits. http://windowslive.com/Tutorial/Hotmail/Storage?ocid=TXT_TAGLM_WL_HM_Tutorial_Storage_062009_

RE: [gdal-dev] Regarding using VRT to open a raw file

2009-06-11 Thread Dan Greve
Excellent Frank, thanks for the tips. I thought there might be a problem with the /vsimem/ since only the VRT XML would be passed as an in-mem buffer, the actual image data is in a disk file. I'll just pass the entire VRT XML for simplicity. -- Dan > Date: Thu, 11 Jun 2009 12:54:

[gdal-dev] Regarding using VRT to open a raw file

2009-06-11 Thread Dan Greve
ad of having to create a VRT file on disk? -- Dan Greve -- Northrop Grumman Corp -- Melbourne, FL _ Lauren found her dream laptop. Find the PC that’s right for you. http://www.microsoft.com/windows/choosepc/

RE: [gdal-dev] concerning VSIInstallSubFileHandler

2009-02-09 Thread Dan Greve
Frank, Exactly the answer I was looking for, I was hoping the MemFileHandler wasn't used directly by the VSISubFileHandler. You are constantly adding features right before I need them. Keep up the great work! -- dan > Date: Mon, 9 Feb 2009 15:21:04 -0500 > From: warmer...@pob

[gdal-dev] concerning VSIInstallSubFileHandler

2009-02-09 Thread Dan Greve
out. My concern with it, as well as the normal VSIMemFileHandler, is in accessing large files. I have 2 GB images, embedded within files that are up to 100 GB in size. Does the VSIMemFileHandler do any sort of paging so that the entire source image is not read into memory? -- Dan Greve

RE: [gdal-dev] NITF Header data

2008-12-17 Thread Dan Greve
I would think it makes sense to return these two fields as metadata, specifically IGEOLO, since IGEOLO might not be returned as a geotransform (such as in the case when BlockA or other higher precision georeferencing is available). -- Dan Greve > Date: Tue, 16 Dec 2008 12:01:05 -0500 >

RE: [gdal-dev] NITF TRE support

2008-11-13 Thread Dan Greve
loper can provide feedback here... -- Dan Greve > From: [EMAIL PROTECTED]> To: gdal-dev@lists.osgeo.org> Date: Wed, 12 Nov 2008 > 11:40:14 -0500> Subject: [gdal-dev] NITF TRE support> > > Ok, I was looking > through nithfile.c, am I correct in understanding >

Re: [gdal-dev] Re: EASE-grid projection

2008-10-10 Thread Dan Stahlke
;+proj=cea ..." you might try adding "+no_defs" at the end. Otherwise, you usually end up getting some sort of default flatting value or something that tends to interfere whenever an explicit radius is specified. Probably the "+ellps=sphere" ends up overriding the fault

Re: [gdal-dev] negative buffer

2008-09-09 Thread Dan Putler
Hi Bruce, Could you give a sense of what you want to cluster and what your objective is with respect to the use of the clustering results? There are a lot of clustering methods out there, so knowing a bit about what you want to accomplish would help. Dan On Tue, 2008-09-09 at 11:13 -0400, Clay