[ka-Map-users] selection sets

C.C. Miller ccmiller at purdue.edu
Fri Sep 21 14:13:56 EDT 2007


Alistair,

We're using kaMap for several projects and have run ourselves into a  
couple of peculiar query situations that we think we have solutions  
for. First, the simplest and nearest-to-completion is at http:// 
gis.lib.purdue.edu/WabashRiver. If you query the County layer you're  
querying a shapefile served up by Mapserver (mapfile extract below).  
Pretty standard. But the individual images of the old river are scans  
of giant pages of an old atlas, both photo and topo maps, so they're  
raster files. Well, in order to query those out and allow people to  
download them, read about them individually, etc., we started by  
generating a shapefile index of those images using an ArcGIS  
'envelope' tool. I didn't really like that, so instead we worked on  
getting kaMap to query FGDC (xml) metadata, stored in the same  
PostgreSQL/PostGIS database that we're storing most of our stuff in  
(the counties shapefile being an exception).

So now, the query in kaMap reaches into a PostGIS column and checks  
the user's bounding box against the extent of the image as written in  
the metadata for that image and returns results as such. It's fast,  
but we're only serving up 30-some scans (and therefore 30-some  
metadata records). In other words, technically you don't need to be  
serving data from Mapserver to be able to query it, which was the  
first part of your question.

And for what it's worth, we're also working on using kaMap queries of  
data to subquery, I guess you could say, and bring in content from  
other places based on what kaMap finds beneath the user's rectangle.  
We have an alpha up at http://gis.lib.purdue.edu/Soil where the user  
can query a vector shapefile (Soil Extract) and based on what it  
finds we fire off another query to a CONTENTdm-hosted object that  
holds the textual piece of the map we're serving. That doesn't need  
to make sense, but I mention it because you said "return  
attributes...for further manipulation" and we've been able to bolt  
some stuff together that makes that happen (in very specific, project- 
specific ways).

Let me know if you want to see our hacked-up, bloody code behind  
these procedures. They work, but there are no doubt a lot of  
improvements you could make.

Chris


C.C. Miller
Assistant Professor of Library Science
GIS Librarian
Purdue University Libraries

feed://www4.lib.purdue.edu/gis/rss.php

ccmiller at purdue.edu
765.496.9474
IM=ccmiller at meebo.org
AIM=cecmcgee
Skype=cecmcgee
Jabber=ccmiller at purdue.edu

2215E EAS (CIVL)
Earth & Atmospheric Sciences Library (EAS)
Civil Engineering Building (CIVL)
550 Stadium Mall Drive
West Lafayette, IN 47907-2051


#################################### LAYER: Counties  
#########################
LAYER ###
  GROUP 'Indiana Counties'
  NAME 'Indiana Counties'
  TEMPLATE 'County_query.html'
  DATA 'path_to_shapefile_without_.shp_extension'
  STATUS on
  TYPE Polygon
  #MAXSCALE 5000002
  MINSCALE 150000
  TRANSPARENCY ALPHA
  TOLERANCE 5
  TOLERANCEUNITS pixels
  LABELITEM 'county'

CLASS ###
NAME 'Indiana Counties'
STYLE ###
  #COLOR 255 255 255
  OUTLINECOLOR 153 204 204
  ANTIALIAS TRUE
  WIDTH 2
END ###style

LABEL ###
  FORCE FALSE
  PARTIALS FALSE
  TYPE TRUETYPE
  FONT CarbonatedGoth
  SIZE 14
  MINFEATURESIZE 70
  COLOR 51 102 153
  OUTLINECOLOR 51 102 153
  POSITION CC
  #ANGLE AUTO
  OFFSET 0 0
END ###label
END ###class

METADATA ###

   "queryable" "false"
   "searchfield" "COUNTY"
   "fields" "COUNTY:County"

END ###metadata

END ###layer

On Sep 18, 2007, at 9:08 PM, Fox, Alistair D ((SKM)) wrote:

> Thanks Sam,
>
> I would assume if you can do a query on point data then line and  
> polygon data would be the same. Just a few techy questions. I  
> gather to be able to do this the source data would need to be  
> served out from a mapserver instance. Are there any examples of  
> this out on the web. I'm yet to see any. On a scale of 1-10 how  
> difficult would it be to develop what my client is after. Eg: draw  
> rectangle and select spatial objects (point/ line / poly) and then  
> return attributes of selection for further manipulation.
>
> Alistair
>
> From: Samuel Hiatt [mailto:samhiatt at gmail.com]
> Sent: Tuesday, 18 September 2007 12:50 AM
> To: Fox, Alistair D (SKM)
> Cc: ka-map-users at lists.maptools.org
> Subject: Re: [ka-Map-users] selection sets
>
> Hi there Alistair!
>
> Yes!  ka-map is the answer to all your problems!  :p  You can  
> definitely do a query on point data with a rectangle bounding box.   
> I couldn't help you too much with the details of it as I work  
> mainly with raster data at this point, but there are plenty of us  
> around here who would be happy to help you get kamap set up and  
> running!
>
> Sam
>
>
>
>
> On 9/16/07, Fox, Alistair D (SKM) <AFox at skm.com.au> wrote:
> Hi. I'm a newbie to Ka-map and are looking to confirm potential  
> functionality for a client. From what i have seen so far this is an  
> execellent project.
>
> One of the requirements my client has is the ability to do the  
> normal GIS function of dragging a rectangle over the map and be  
> able to select the features that are within that area. Then the  
> ability to working with this selection set. e.g: display attributes  
> about the features.
>
> What i need to know is can you do this at the moment, (i havn't  
> seen any examples) and if not is it possible with some customisation.
>
> Hope someone out there can help.
>
> Alistair
>
> SKM is committed to working with its clients to deliver a  
> sustainable future for all. Please consider the environment before  
> printing this e-mail.
> Notice - This message contains confidential information intended  
> only for the exclusive use of the addressee named above. No  
> confidentiality is waived or lost by any mistaken transmission to  
> you. If you have received this message in error please delete the  
> document and notify us immediately.
> Any opinion, text, documentation or attachment received is valid as  
> at the date of issue only. The recipient is responsible for  
> reviewing the status of the transferred information and should  
> advise us immediately upon receipt of any discrepancy.
> All email sent to SKM will be intercepted, screened and filtered by  
> SKM or its approved Service Providers.
>
> _______________________________________________
> ka-Map-users mailing list
> ka-Map-users at lists.maptools.org
> http://lists.maptools.org/mailman/listinfo/ka-map-users
>
>
>
> SKM is committed to working with its clients to deliver a  
> sustainable future for all. Please consider the environment before  
> printing this e-mail.
> Notice - This message contains confidential information intended  
> only for the exclusive use of the addressee named above. No  
> confidentiality is waived or lost by any mistaken transmission to  
> you. If you have received this message in error please delete the  
> document and notify us immediately.
> Any opinion, text, documentation or attachment received is valid as  
> at the date of issue only. The recipient is responsible for  
> reviewing the status of the transferred information and should  
> advise us immediately upon receipt of any discrepancy.
> All email sent to SKM will be intercepted, screened and filtered by  
> SKM or its approved Service Providers.
> _______________________________________________
> ka-Map-users mailing list
> ka-Map-users at lists.maptools.org
> http://lists.maptools.org/mailman/listinfo/ka-map-users




-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.maptools.org/pipermail/ka-map-users/attachments/20070921/00f60a76/attachment-0001.html


More information about the ka-Map-users mailing list