Spatial Query on VirtualSpatial layer
Blaine Hackett
blaine_hack1 at YAHOO.COM
Mon Oct 25 19:22:30 PDT 2004
Frank
Sorry it took so long to reply. I get a day about
every two weeks to work on this.
I am using an X and Y field from an ODBC connection to
show the VSD layer. I can see them but I have not
successfully queried them. I have tried several
different query types within the VSD.
Here is my layer syntax:
LAYER
NAME "tracklayer"
TYPE point
CONNECTIONTYPE OGR
CONNECTION "C:\data\virtual_minn.ovf" # the name
and path to the virtual.ovf file, relative to
shapepath may work?
DATA "trackstuff"
STATUS ON
#LABELITEM "truck"
LABELANGLEITEM "heading"
LABELCACHE OFF
FORCE ON
PROJECTION
proj=latlong
END
TOLERANCEUNITS feet
TOLERANCE 300
CLASSITEM "speed1"
CLASS
TEMPLATE "query.html"
EXPRESSION "55"
TEXT "."
LABEL
COLOR 255 0 0
TYPE TRUETYPE
FONT esriarrow
SIZE 25
MINSIZE 20
MAXSIZE 30
END
END
CLASS
EXPRESSION "44"
TEXT "."
LABEL
COLOR 0 255 0
TYPE TRUETYPE
FONT esriarrow
SIZE 25
MINSIZE 20
MAXSIZE 30
END
END
END
So, to click on them or draw a box around several
points and have the info about the point returned to
an html query template is all I am tying to do.
Does that make sense?
Blaine
--- Frank Warmerdam <warmerdam at POBOX.COM> wrote:
> Blaine Hackett wrote:
> > All
> >
> > Is there any way to do a spatial query on a
> > VirtualSpatialData layer?
> >
> > I tried a general mapserver query like you use on
> a
> > shapefile and got this error.
> > "mapserv(): Web application error. No way to
> generate
> > a valid map extent from selected shapes."
> >
> > This looks bad to me. Am I out of luck or just
> doing
> > it wrong?
>
> Blaine,
>
> As long as you have spatial information available on
> the virtual
> layer (for instance by picking x and y columns from
> the original table)
> you should be able to do spatial queries against the
> virtual layer.
>
> Tracking through the code it looks like you might
> get this error if
> you did a query and got no results back. Is that
> possible? Or, if you
> query results had no spatial information.
>
> Best regards,
> --
>
---------------------------------------+--------------------------------------
> I set the clouds in motion - turn up | Frank
> Warmerdam, warmerdam at pobox.com
> light and sound - activate the windows |
> http://pobox.com/~warmerdam
> and watch the world go round - Rush | Geospatial
> Programmer for Rent
>
__________________________________
Do you Yahoo!?
Yahoo! Mail Address AutoComplete - You start. We finish.
http://promotions.yahoo.com/new_mail
More information about the MapServer-users
mailing list