[Mapserver-users] OGC-compliant WMS-serverdeliveringdynamic layers with MS?
Frieso ter Haseborg
ter-haseborg at sf-datentechnik.de
Tue Jan 6 08:38:18 PST 2004
This is a multi-part message in MIME format.
------_=_NextPart_001_01C3D473.7D5F9710
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Hi Debbie,
this thread is already a little older, and I'm quite late with this, but
I promised to keep you informed and to share back the code. ;-)
>That part of the code could easily be changed... if you do it,=20
>please share the code with us!
Strictly speaking I didn't change the part of code, since I found my own
approach, but your script was a great inspiration to get things started.
Thank you so much!
So here are my ideas to do a text/plain-dump. This is only the relevant
part with some omissions to keep things simple (see attachment).
In the function ims_getFeatureInfo () I do in principle the same things
as you did in the getFeatureInfo part, i.e. determining the closest
point to the coordinates requested by the user and than fetching the
appropiate feature-informations from a database. These features are
returned as pure text by the function mentioned above, and just echoed
out. So other applications using these script can easily catch them for
further processing. With a little more string processing the output
could also be extended to fully qualified html.=20
Best regards,
Frieso ter Haseborg
- Software Development -=20
=20
--
--------------------------------------------------=20
S&F Datentechnik GmbH&Co.KG=20
Reimersstr. 41b=20
26789 Leer, Germany
=20
>-----Original Message-----
>From: Debbie Pagurek [mailto:pagurekd at agr.gc.ca]
>Sent: Wednesday, October 15, 2003 4:42 PM
>To: Frieso ter Haseborg
>Cc: mapserver-users at lists.gis.umn.edu
>Subject: RE: [Mapserver-users] OGC-compliant=20
>WMS-serverdeliveringdynamic
>layers with MS?
>
>
>Hi,
>and thanks for pointing out that the url for the getfeatureinfo was
>pointing to an internal server. Here's what the application points to
>now:
>http://sis.agr.gc.ca/pls/bb/bcin%5FspeCs%2Ecoord?p%5Flat=3D20.633
>3&p%5Flong=3D-156.433&p%5Ftaxon=3DAbudefduf
>abdominalis=20
>
>And to answer your question, yes, it seems you've caught me - this
>getfeatureinfo request does not seem to be ogc-compliant and instead we
>did something to fit our own application so that some meaningful
>information was returned to the user. =20
>
>I guess a true getfeatureinfo response would be either a text dump or a
>gml dump that would just list the point coordinate information? That
>part of the code could easily be changed... if you do it, please share
>the code with us!
>
>Debbie
>
>
>
>
>>>> "Frieso ter Haseborg" <ter-haseborg at sf-datentechnik.de> 10/15/03
>09:38AM >>>
>Hi Debbie,
>
>first of all thanks a lot for posting your code - yes, it's been a
>great
>help bringing some light how to handle these things.
>
>One more question - if you will excuse me.
>The solution to handle GetMap and GetCapabilities are understood in
>particular the idea to create a new mapfile and to let mapserver do
>the
>xml-generation for GetCapabilities seems clever to me.
>
>But I've still a question regarding the getFeatureInfo-Request.
>Instead
>of returning the direct output you dump an url. What would be the
>result
>on executing this url? I can't test this, since the url I get on
>trying
>your demo-link leads to an unaccessible server. Would the other serve
>deliver the desired output?=20
>
>Would MS be able to handle this reroute if an url is dumped instead of
>a
>result in the info_format normally specified with a
>getFeatureInfo-Request?
>Or in other words: This isn't ogc-compliant (no offense!), is it?
>
>TIA,
>=20
>Frieso ter Haseborg
>- Software Development -=20
>=20
>--
>
>--------------------------------------------------=20
>S&F Datentechnik GmbH&Co.KG=20
>Reimersstr. 41b=20
>26789 Leer, Germany
>
>
>>-----Original Message-----
>>From: Debbie Pagurek [mailto:pagurekd at agr.gc.ca]=20
>>Sent: Monday, September 29, 2003 8:37 PM
>>To: mapserver-users at lists.gis.umn.edu; Frieso ter Haseborg
>>Cc: Tom.Kralidis at CCRS.NRCan.gc.ca=20
>>Subject: Re: [Mapserver-users] OGC-compliant WMS-server
>>deliveringdynamic layers with MS?
>>
>>
>>
>>OK everybody,
>>I've attached the PHP code that I wrote for handling the WMS requests
>>to our Integrated Taxonomic Information System internet mapping
>>application.
>>
>>I have removed most of the code that shows that transfer of the point
>>information via XML to the application, because the points can=20
>>come from
>>anywhere: XML, a direct database connection, or a shapefile. =20
>>
>>The point of interest here is how the WMS request name/value pairs
>are
>>handled in PHP and how the corresponding results are returned (an
>image
>>for a getmap request, an xml stream for the getcapabilities request,
>a
>>pop up window with a new URL for a getfeatureinfo request).
>>
>>I tried to include all possible name/value pairs that can come in via
>a
>>WMS request but I think I missed some e.g. EXCEPTIONS=3D
>>
>>I am no programming guru so please forgive any weird programming
>>foibles in here. All I know is that the application does WORK!=20
>>Hopefully some of you will find this useful in some way. Please let
>me
>>know if you have found it helpful or if you see any problems.
>>
>>Keep in mind that the GetCapabilities for this application was a
>>problem because we are mapping over 100,000 taxa, and it is
>ridiculous
>>to include that many layers in a getcapabilities document. In the
>>getcapabilities section I included a default (no layer name is=20
>>specified
>>in the request) as well as a dynamic response that writes out a new
>>mapfile if a layername is specified (e.g.
>>request=3Dgetcapabilites&layers=3DAbudefduf)
>>
>>An example of the type of requests that are handled by this script:
>>Getmap:
>>http://wms1.agr.gc.ca/mapdata/itis/testscript.php?VERSION=3D1.1.0=20
>>&REQUEST=3DGetMap&Layers=3DCyanocit
>ta%20cristata&SRS=3DEPSG:42304&BBO
>>X=3D-2750560,-936638,3583870,4673120&WIDTH=3D339&HEIGHT=3D300
>>
>>GetFeatureInfo:
>>http://wms1.agr.gc.ca/mapdata/itis/testscript.php?VERSION=3D1.1.0=20
>>&REQUEST=3DGetFeatureInfo&QUERY_LAYERS=3DAbudefduf+abdominalis&Laye
>>r=3DAbudefduf+abdominalis&X=3D250&Y=3D150
>>
>>GetCapabilities:
>>http://wms1.agr.gc.ca/mapdata/itis/testscript.php?VERSION=3D1.0.0=20
>>&REQUEST=3DGetCapabilities
>>
>>I am no programming guru so please forgive any weird programming
>>idiosyncrasies in here. All I know is that the application does WORK!
>
>>Hopefully some of you will find this useful in some way. Please let
>me
>>know if you have found it helpful or if you see any problems.
>>
>>Debbie Pagurek
>>=20
>>
>>Debbie Pagurek, M.Sc.
>>GIS and Remote Sensing Analyst / T=E9l=E9d=E9tection, SIG
>>Research Branch / D.G. Recherche
>>Agriculture and Agri-Food Canada / Agriculture et Agroalimentaire
>>Canada
>>Telephone / T=E9l=E9phone: 613-759-1543
>>Facsimile / T=E9l=E9copieur: 613-759-1937
>>960 Carling Avenue
>>Ottawa, Ontario
>>K1A 0C6
>>pagurekd at agr.gc.ca=20
>>
>>>>> "Frieso ter Haseborg" <ter-haseborg at sf-datentechnik.de> 09/17/03
>>11:56AM >>>
>>Hi,
>>
>>I'm searching for possibilities to use MS for building an
>>OGC-compliant
>>WMS-service which creates and serves dynamic layers from data out of
>>RDBMS. These RDBMS do NOT have any spatial-extensions it's just the
>>"x,y-coordinate & label-data"-thing.=20
>>
>>So what I want to do: retrieve the coordinates from my databases and
>>create one or more dynamic layers. I did some experiments with
>>PHP/MapScript, no major problems so far, that seems to be the easier
>>part.
>>
>>The problem comes here: I don't want to create these layers in any
>>client-app, I want to have these layers served by the mapserver,
>since
>>I
>>have to incorporate other servers e.g. ArcIMS which have to use and
>>process this layers through OGC-requests. Any ideas?
>>
>>Are there any possibilities to create dynamic layers from RDBMS e.g.
>>Sybase ASA, MS SQL Server, Oracle without spatial-extensions I
>>overlooked, besides doing this in PHP/MapScript?
>>
>>Are there any hooks or entry-points in the mapserv-cgi to process
>>customized-operations like creating the mentioned dynamic layers?
>>
>>Any comment and hint would be appreciated!
>>
>>TIA,
>>=20
>>Frieso ter Haseborg
>>- Software Development -=20
>>=20
>>--
>>
>>--------------------------------------------------=20
>>S&F Datentechnik GmbH&Co.KG=20
>>Reimersstr
>>. 41b=20
>>26789 Leer, Germany
>>
>>_______________________________________________
>>Mapserver-users mailing list
>>Mapserver-users at lists.gis.umn.edu=20
>>http://lists.gis.umn.edu/mailman/listinfo/mapserver-users=20
>>
>
>_______________________________________________
>Mapserver-users mailing list
>Mapserver-users at lists.gis.umn.edu
>http://lists.gis.umn.edu/mailman/listinfo/mapserver-users
>
>
------_=_NextPart_001_01C3D473.7D5F9710
Content-Type: application/octet-stream;
name="getfeature.php"
Content-Transfer-Encoding: base64
Content-Description: getfeature.php
Content-Disposition: attachment;
filename="getfeature.php"
Y2FzZSAnZ2V0ZmVhdHVyZWluZm8nOg0KCS8vLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t
LS0tLS0tLS0tLS0tLS0t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