Re: [mapserver-users] Point in polygon

2009-09-23 Thread truongpm

Thanks Steve, I trying with MySWL Spatial extension. 

Steve Lime wrote:
 
 I know if you were in PostGIS you could do a spatial join of sorts. That
 is join
 each commune polygon with the points it contains (or just a count) based
 on 
 an intersection operator. I don't know if that's possible with MySQL or
 not.
 
 You could also consider pre-processing your data if it doesn't change
 often. 
 A simple MapScript script could be used like so:
 
   - for each commune geom
 - build a shapeObj
 - do a queryByShape() against the point data
 - store the count in the appropriate commune record 
 
 You might have to pull the park data into something MapServer can query.
 With the count in the commune data you could easily classify on that
 attribute. You'd see better performance as well.
 
 Some ideas anyway.
 
 Steve
 
 truongpm truong_pham_m...@yahoo.com 09/22/09 2:13 AM 
 
 Hi list,
 
 I have a problem with defined a point is in which polygon. For example, a
 map have 2 layer: commune-polygon; park - point.
 I want to layout color of polygon (each commune) depend on amount of point
 in this polygon.
 
 I done with query polygon from mySQL database, layout its color base on an
 attribute in database.
 
 My question is that how could i know which polygon that point inside???
 
 Thanks for your attentions and sorry about my language skills.
 -- 
 View this message in context:
 http://n2.nabble.com/Point-in-polygon-tp3690813p3690813.html
 Sent from the Mapserver - User mailing list archive at Nabble.com.
 ___
 mapserver-users mailing list
 mapserver-users@lists.osgeo.org
 http://lists.osgeo.org/mailman/listinfo/mapserver-users
 
 ___
 mapserver-users mailing list
 mapserver-users@lists.osgeo.org
 http://lists.osgeo.org/mailman/listinfo/mapserver-users
 
 

-- 
View this message in context: 
http://n2.nabble.com/Point-in-polygon-tp3690813p3699021.html
Sent from the Mapserver - User mailing list archive at Nabble.com.
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


[mapserver-users] Point in polygon

2009-09-22 Thread truongpm

Hi list,

I have a problem with defined a point is in which polygon. For example, a
map have 2 layer: commune-polygon; park - point.
I want to layout color of polygon (each commune) depend on amount of point
in this polygon.

I done with query polygon from mySQL database, layout its color base on an
attribute in database.

My question is that how could i know which polygon that point inside???

Thanks for your attentions and sorry about my language skills.
-- 
View this message in context: 
http://n2.nabble.com/Point-in-polygon-tp3690813p3690813.html
Sent from the Mapserver - User mailing list archive at Nabble.com.
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] Point in polygon

2009-09-22 Thread Steve Lime
I know if you were in PostGIS you could do a spatial join of sorts. That is join
each commune polygon with the points it contains (or just a count) based on 
an intersection operator. I don't know if that's possible with MySQL or not.

You could also consider pre-processing your data if it doesn't change often. 
A simple MapScript script could be used like so:

  - for each commune geom
- build a shapeObj
- do a queryByShape() against the point data
- store the count in the appropriate commune record 

You might have to pull the park data into something MapServer can query.
With the count in the commune data you could easily classify on that
attribute. You'd see better performance as well.

Some ideas anyway.

Steve

 truongpm truong_pham_m...@yahoo.com 09/22/09 2:13 AM 

Hi list,

I have a problem with defined a point is in which polygon. For example, a
map have 2 layer: commune-polygon; park - point.
I want to layout color of polygon (each commune) depend on amount of point
in this polygon.

I done with query polygon from mySQL database, layout its color base on an
attribute in database.

My question is that how could i know which polygon that point inside???

Thanks for your attentions and sorry about my language skills.
-- 
View this message in context: 
http://n2.nabble.com/Point-in-polygon-tp3690813p3690813.html
Sent from the Mapserver - User mailing list archive at Nabble.com.
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users

___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users