Error in Display Of Polygon

Topics: Data Access, Algorithms, SharpMap Project, SharpMap v0.9 / v1.x, Web Controls
Feb 6, 2008 at 2:24 PM
Edited Feb 6, 2008 at 2:25 PM
Hello All
I have a problem in displaying some polygons that are made inside another bigger polygon and also when i click on polygons that are inside the bigger polygon and use NTS to query then i get the boundary of the outer polygon (Bigger)
Please help me to resolve the problem
I am working on 0.9 Sharpmap in Ajax
Thanxs in advance
Regards
Nishant Jain
Developer
Feb 6, 2008 at 4:58 PM

nishantJain wrote:
I have a problem in displaying some polygons that are made inside another bigger polygon and also when i click on polygons that are inside the bigger polygon and use NTS to query then i get the boundary of the outer polygon (Bigger)
Please help me to resolve the problem
Nishant Jain

Looks like you're asking... "how deep is blue?"...
Please post a specific question about your problem and some sample code.
Feb 7, 2008 at 6:31 AM


D_Guidi wrote:

nishantJain wrote:
I have a problem in displaying some polygons that are made inside another bigger polygon and also when i click on polygons that are inside the bigger polygon and use NTS to query then i get the boundary of the outer polygon (Bigger)
Please help me to resolve the problem
Nishant Jain

Looks like you're asking... "how deep is blue?"...
Please post a specific question about your problem and some sample code.

Thanxs for the reply
The problem is i have defined a shape file that has a polygon that represents a farm inside that farm there is a house so i have a big polygon that represnts the farm and another inside this polygon that represents the house now when i try to display this file i have a problem that the boundrys of the farm polygon are displayed but not that of the house though the label that i have given to both appear but the closing boundry of the house do not appear also when i click the farm polygon then the click event for the farm is executed but when i click the label of the house polygon then also the event for farm polygon that is closing boundry of the farm polygon appears
please help me
Regards
Nishant jain
Developer
Feb 7, 2008 at 9:12 AM
1) Code!! We need code!
2) Use the commas, please...

BTW, make sure that you have set a outline color for your polygons...
Developer
Feb 9, 2008 at 10:26 AM
Edited Feb 10, 2008 at 8:08 AM
Here my answer from a general GIS perspective (i dont know exactly what you are doing in SharpMap)

If the house is within the farmland polygon a query-click on the house should result in both house and farmland. If you somehow limit the number of results to one there is no guaranty which one that is. That is what the logic would be. If you want to resolve this you could move the house to another layer and query that layer first, if you get no result you query the farmland layer.

For showing the polygons it is the same problem. Probably the farmland is drawn on top of the house due to the order of polygons in the datasource. This should be resolved if you move the house to another layer and draw that one on top.

Another solution (for both problems) is to define the farmland as a polygon with a hole at the place of the house. A query (pointwithinpolygon) on the hole should return no result.