[Fwd: Re: [mapserver-users] symbolize a wms map based upon a sql count() query]

Pietro Giannini pgiannini at bytewise.it
Thu Oct 30 03:59:32 PDT 2008


I tried, this sample work.

SELECT countries.id, countries.name, count(related_table.*) FROM
countries, related_table WHERE countries.id = related_table.country_id
GROUP BY countries.id, countries.name

........................pg




-------------------------- Messaggio originale ---------------------------
Oggetto: Re: [mapserver-users] symbolize a wms map based upon a sql
count()  query
Da:      "Pietro Giannini" <pgiannini at bytewise.it>
Data:    Gio, Ottobre 30, 2008 11:22
A:       mapserver-users at lists.osgeo.org
Cc:      "Scott Pezanowski" <scottpez at hotmail.com>
--------------------------------------------------------------------------

Maybe a view on postresql, with both count and geometry?
can you pls post a little sample data?
ciao
............................pg

-- 
Pietro Giannini
Bytewise srl - Area GIS
41°50'38.58"N 12°29'13.39"E



On Gio, Ottobre 30, 2008 03:52, Scott Pezanowski wrote:
> Hi,
>
> I am hoping to be able to symbolize a WMS or image map, based upon the
> results of a SQL COUNT() query. To be more specific, this query needs to
> be dynamic based upon user input from my application for specific
> attributes in the data, count up the number of records that meet that
> query, and then produce a choropleth map of the resulting counts. So the
> query would produce, a count of 10 records for one county, 5 records for
> another county, etc. and my counties will be colored based upon a scheme
> for these counts. My data is in a PostGIS database.
>
> Is there a way to do this with Mapserver? I am currently simply returning
> all of the records that meet my criteria and counting things up on the
> client application. But I am hoping there is a way to do this on the
> server or database-side of things.
>
> Thank you very much in advance for any help or tips you may be able to
> offer. Also, please let me know if you need more info on what I am trying
> to do.
>
> Thanks,
> Scott
>
>
>
>
> ********************************************* Scott Pezanowski
>
>
> email: scottpez at hotmail.com
> *********************************************
> _______________________________________________
> mapserver-users mailing list
> mapserver-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>

_______________________________________________
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