[gdal-dev] sqlite dialect and MySQL spatial input
Even Rouault
even.rouault at mines-paris.org
Tue Oct 1 13:26:15 PDT 2013
Le mardi 01 octobre 2013 22:01:51, Jukka Rahkonen a écrit :
> Even Rouault <even.rouault <at> mines-paris.org> writes:
> > Le mardi 01 octobre 2013 08:58:22, Jukka Rahkonen a écrit :
> > > - The default SQL dialect is "OGR SQL", except for databases when the
> > > default is to use the native SQL dialect of the RDBMS
> > > - The default dialect can be overridden by the -dialect parameter,
> > > which can take values "OGR SQL" or "SQLITE" and after your change this
> > > works for all drivers in a similar way.
> >
> > Yes. Just to crrect : the string is OGRSQL (no space)
>
> ...Snip...
>
> > > It would be good to give the alternatives and a hint about how to give
> > > OGR SQL so that the space character will not cause trouble as
> > >
> > > -dialect dialect:
> > > SQL dialect. Can take values "OGR SQL" or "SQLITE".
> >
> > Adding quote would be indeed good to avoid the confusion with
> > space/nospace. Want to give a crack at it ?
>
> Not really if the string to use is "OGRSQL" and not "OGR SQL" as I thought.
> I noticed that ogr2ogr accepts "OGR SQL" but also -dialect "FOO" with
> pleasure. Want to give a crack ?
Hum, not sure if that's really worth and it would not be very convenient to do
the validation.
For drivers such as shapefile this could be detected in the generic
implementation.
For other drivers with a specialized implementation, the logic is "if it is
'OGRSQL' or 'SQLITE', use the OGRSQL or SQLITE implementation, otherwise
whatever the string is, use the specialized implementation". Perhaps some
people for the PG driver use dialect = PG ?
>
> Alternatively I can try to improve documentation a bit?
I'm a bit lost at what you want to improve now, but if you feel to do it,
please do so.
>
> -Jukka-
>
>
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev
--
Geospatial professional services
http://even.rouault.free.fr/services.html
More information about the gdal-dev
mailing list