[mapserver-users] wfs client question

bartvde at osgis.nl bartvde at osgis.nl
Mon Dec 8 06:56:55 EST 2008


Hi Knut,

Mapserver should be able to do this for you.

Just use wfs_srs "EPSG:31468" on your CONNECTIONTYPE WFS layer, and maybe
add a PROJECTION block as well on the LAYER:

  PROJECTION
    "init=epsg:31468"
  END

On your MAP object you can use:

  PROJECTION
    "init=epsg:4326"
  END

Mapserver should reproject the coordinates before doing the WFS request.

If you want to do this in javascript instead I would recommend using proj4js:

http://proj4js.org/

Best regards,
Bart

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> I want to query a public wfs server for some data.
> Internally, in my DHTML frontend, all lat/lon coordinates are handled in
> geographic coordinates EPSG:4326.
> However, the WFS server only accepts lat/lon values given with
> particular BBOX parameters specified in EPSG:31468, presumably.
>
> Hence, I think that before the making the request for the external WFS
> data, I need to convert the geographic EPSG:4326 coordinates to
> EPSG:31468 on the fly.
>
> What is the best way to do this?
>
> - - in javascript, on the frontend side?
>   -- using ajax requests?
>   -- or is there a recommended JS library for coordinate transforms?
>
> - - or on the the wfs client side, i.e. where my mapserver cgi is hosted ?
> Manipulating the cgi parameters somehow, before the request is sent out
> to the WFS server?
>
>
> Or am I did I get something wrong about the WFS specification?
> This is the first time I interact with a WFS, so please help me out
> someone...
>
>
> Knut
>
> - --
> ____________________________________________________________________________
>
> Knut Behrends                         Phone: +49 (0) 331 288 1688
> Potsdam 14473                         KeyID: 0xF22CACEF (PGP Public Key)
> ____________________________________________________________________________
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.9 (GNU/Linux)
>
> iEYEARECAAYFAkk9CWQACgkQcfWHNfIsrO/HGACgn6RrH3kRgRSHt0G2UsiB/pEH
> c8wAn1KzH6ACLag6JTaY3ffOejXgqEqD
> =L5Fx
> -----END PGP SIGNATURE-----
> _______________________________________________
> mapserver-users mailing list
> mapserver-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>




More information about the mapserver-users mailing list