OGR and XML

Bart van den Eijnden bartvde at XS4ALL.NL
Fri Sep 2 14:31:09 EDT 2005


Hi Tim,

I know Frank added this capability very recently for the VRT driver, so it
probably depends on which version of GDAL/OGR you use (you need 1.3
probably). This is the bug report:

http://bugzilla.remotesensing.org/show_bug.cgi?id=900

I use WFS on MySQL Virtual Spatial Data, and Mapserver sets a FILTER on
the OGR VRT LAYER, and OGR adds that to the WHERE CLAUSE which it sends to
the database. You could use the same approach, setting a dynamic FILTER.

Hope this helps.

Btw I am cc-ing the list as it might be useful for other people as well.

Best regards,
Bart

> Bart,
>
> 	Quick question, since you seem to be familiar with OGR. I currently use
> OGR to supply a virtual layer, and then filter the layer using an SLD.
> The SLD filter is generated 'on the fly' (PHP script output) using
> parameters passed from user selections.
> 	Is there a way to generate the SQL for the OGR layer dynamically? This
> would eliminate the need to retrieve all the data into the layer, only to
> filter most of it. Perhaps a dynamic ovf file, instead of the static
> file?
> 	I've been meaning to experiment with this, and your post below to the
> list piqued my curiosity again....
>
> 	Thanks,
>
> Timothy Pascoe
>
> Environment Canada / Environnement Canada
> Canada Centre for Inland Waters / Centre Canadien des Eaux Intérieures
> 867 Lakeshore Road / 867, chemin Lakeshore
> Burlington, Ontario / Burlington (Ontario)
> L7R 4A6
>
> Tel/Tél: (905) 336-6239
> Fax/Téléc: (905) 336-4699
> E-mail/C. élec: tim.pascoe at ec.gc.ca
> Government of Canada/Gouvernement du Canada
> This e-mail represents the opinions and views solely held by its author
> and in no manner may be considered as representing those of his/her
> employer.
>
>
> -----Original Message-----
> From: UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU] On
> Behalf Of Bart van den Eijnden
> Sent: September 2, 2005 2:13 PM
> To: MAPSERVER-USERS at LISTS.UMN.EDU
> Subject: Re: [UMN_MAPSERVER-USERS] OGR and XML
>
> You need this type of LAYER in your MAPFILE:
>
> CONNECTIONTYPE OGR
> CONNECTION "virtual.ovf"
> DATA "mylayer" # the name of the OGRVrtLayer
>
> Always check your ovf file first with the ogrinfo tool.
>
> Best regards,
> Bart
>
> On Fri, 02 Sep 2005 19:27:12 +0200, Davi Duchovni <duchovni at GMAIL.COM>
> wrote:
>
>> Please I am creating the Virtual Spatial Data but i don´t know how to
>> create the xml file and how to link the map file whith the xml file!!!
>>
>> please, could any one help me?!?!?!
>>
>> follow the file of what i´m doind!!!
>>
>> thanks
>>
>> <OGRVRTDataSource>
>>
>>    <OGRVRTLayer name="teste">
>>        <SrcDataSource>ODBC:user/pass at DNS</SrcDataSource>
>>        <SrcLayer>teste</SrcLayer>
>>        <GeometryType>wkbPoint</GeometryType>
>>        <LayerSRS>WGS84</LayerSRS>
>>        <GeometryField encoding="PointFromColumns" x="x" y="y"/>
>>    </OGRVRTLayer>
>>
>> </OGRVRTDataSource>
>>
>>
>> LAYER
>>    NAME teste
>>    CONNECTIONTYPE OGR
>>    CONNECTION "ODBC:user/pass at DNS"
>>    DATA "select X,Y from vw_aluno_xy where ID = 107581"
>>    STATUS ON
>>    TYPE POINT
>>
>>
>> thanks a lot
>>
>> Davi
>>
>>
>
>
>
> --
> Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
>
>



More information about the mapserver-users mailing list