Filter some rows from table in PostGre
Pericles S. Nacionales
naci0002 at UMN.EDU
Thu Feb 22 00:22:19 EST 2007
Win,
Your question is best asked in the MapServer-Users list where there are
plenty of people who would be more than happy to help you out. The
mapserver-dev list focuses more on MapServer source code development and
related topics, not so much on creating web mapping applications.
Anyway, I suggest you look into the FILTER keyword to limit the results
of your database query. You can look at the usage and example at
http://mapserver.gis.umn.edu/docs/reference/mapfile/layer. I hope this
helps.
Good luck!
-Perry
Win Myint Aung wrote:
> Dear Members,
>
> I am a newbie for development of MapServer application. I have a
> problem about to retrieve geo spatial data from PostGre to show on
> map. I want to show some rows from a table.
>
> for example, there are 100 rows with geospatial data in a table. I
> only want to show 10 rows on map without removing other rows. please
> suggest me.
>
> Please see the followings. I
>
> LAYER #Confidence
> CONNECTIONTYPE postgis
> NAME "firepoint"
> CONNECTION "user=postgres password=1234 dbname=hotspot_db
> host=localhost port=5432"
> DATA "the_geom from hotspot_tmp "
> TOLERANCE 3
> STATUS ON
> TYPE POINT
> CLASSITEM "f_posibl"
> TEMPLATE '/ms4w/projects/hotspot/htdocs/templates/HFVS.html'
> CLASS
> NAME "Low"
> EXPRESSION ([f_posibl] < 40)
> STYLE
> COLOR 255 255 0
> SYMBOL "square"
> OUTLINECOLOR 0 0 0
> SIZE 5
> END
> END
> CLASS
> NAME "Moderate"
> EXPRESSION (([f_posibl] > 40) and ([f_posibl] < 70))
> STYLE
> COLOR 255 155 55
> SYMBOL "square"
> OUTLINECOLOR 0 0 0
> SIZE 5
> END
> END
> CLASS
> NAME "High"
> EXPRESSION ([f_posibl] > 70)
> STYLE
> COLOR 255 0 0
> SYMBOL "square"
> OUTLINECOLOR 0 0 0
> SIZE 5
> END
> END
> END
>
> Thanks.
>
> Win Myint Aung
>
> Now that's room service! Choose from over 150,000 hotels
> in 45,000 destinations on Yahoo! Travel
> <http://travel.yahoo.com/hotelsearchpage;_ylc=X3oDMTFtaTIzNXVjBF9TAzk3NDA3NTg5BF9zAzI3MTk0ODEEcG9zAzIEc2VjA21haWx0YWdsaW5lBHNsawNxMS0wNw-->
> to find your fit.
More information about the mapserver-dev
mailing list