[Geomoose-users] Combined spatial and attribute query

Bistrais, Bob Bob.Bistrais at maine.gov
Tue Feb 12 12:18:52 PST 2013


I was able to come up with a method that seems to work for me-

In PHP/MapScript, I take my selection layer, and set a filter to it.  That effectively performs the attribute query for my purposes.  Once that's done I can do the spatial query, and I seem to be getting the appropriate results.

Thanks to everyone for their help and suggestions.



From: Brian Fischer [mailto:bfischer at houstoneng.com]
Sent: Monday, February 11, 2013 4:41 PM
To: Mark Volz; Bistrais, Bob; Basques, Bob (CI-StPaul); geomoose-users at lists.osgeo.org
Subject: RE: Combined spatial and attribute query

You could also do a similar thing with MS SQL server 2008 or even ArcSDE if those are options.

Brian Fischer, CFM
Principal | GIS Project Manager
Houston Engineering, Inc.
O 763.493.4522 | D 763.493.6664 | M 763.229.2734

From: geomoose-users-bounces at lists.osgeo.org<mailto:geomoose-users-bounces at lists.osgeo.org> [mailto:geomoose-users-bounces at lists.osgeo.org] On Behalf Of Mark Volz
Sent: Friday, February 08, 2013 10:36 AM
To: Bistrais, Bob; Basques, Bob (CI-StPaul); geomoose-users at lists.osgeo.org<mailto:geomoose-users at lists.osgeo.org>
Subject: Re: [Geomoose-users] Combined spatial and attribute query

Bob,

I wonder if SpatialLite would work.  SpatialLite is a lightweight file based DBMS so you wouldn't need to install another piece of software.  I did ask the MS4W group about the support status a couple years ago, so I don't know if it is supported or how well it performs.


Mark Volz
GIS Specialist

From: geomoose-users-bounces at lists.osgeo.org<mailto:geomoose-users-bounces at lists.osgeo.org> [mailto:geomoose-users-bounces at lists.osgeo.org] On Behalf Of Bistrais, Bob
Sent: Friday, February 08, 2013 10:29 AM
To: Basques, Bob (CI-StPaul); geomoose-users at lists.osgeo.org<mailto:geomoose-users at lists.osgeo.org>
Subject: Re: [Geomoose-users] Combined spatial and attribute query

No can do.
As much as I like the thought of us going to PostGIS, the boss has repeatedly told us no, at least for the time being, regarding PostGIS.


From: Basques, Bob (CI-StPaul) [mailto:bob.basques at ci.stpaul.mn.us]
Sent: Friday, February 08, 2013 11:26 AM
To: Bistrais, Bob; geomoose-users at lists.osgeo.org<mailto:geomoose-users at lists.osgeo.org>
Subject: RE: Combined spatial and attribute query

Put your data into Postgres/Postgis and use MapServer.  You have complete control over how the SQL is processed from the MapServer Mapfiles.  If you want to really getinto the weeds, you can use a scriptiong lang like PERL (my poison of choice) and run your queries via dynamic SQL creation, etc.

Bobb



From: geomoose-users-bounces at lists.osgeo.org<mailto:geomoose-users-bounces at lists.osgeo.org> [mailto:geomoose-users-bounces at lists.osgeo.org] On Behalf Of Bistrais, Bob
Sent: Friday, February 08, 2013 10:03 AM
To: geomoose-users at lists.osgeo.org<mailto:geomoose-users at lists.osgeo.org>
Subject: [Geomoose-users] Combined spatial and attribute query

I posted this to the MapServer list a minute ago, but thought I might also ask from the GeoMoose perspective...

Does anyone have advice on the best or most efficient way to query data, involving both a spatial and an attribute query.  I need to query several layers, selecting based on an area, then select from that selection based on an attribute value.  It would be OK to query by the attribute first, then spatial.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/geomoose-users/attachments/20130212/6a90a9a8/attachment.html>


More information about the Geomoose-users mailing list