<br><br><div class="gmail_quote">On Wed, May 11, 2011 at 4:37 AM, Piotr Przybylski <span dir="ltr"><<a href="mailto:piotr.prz@gmail.com">piotr.prz@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
2011/5/10 Madhura Jayaratne <<a href="mailto:madhura.cj@gmail.com">madhura.cj@gmail.com</a>>:<br>
<div><div></div><div class="h5">><br>
><br>
> On Tue, May 10, 2011 at 11:51 PM, Madhura Jayaratne <<a href="mailto:madhura.cj@gmail.com">madhura.cj@gmail.com</a>><br>
> wrote:<br>
>><br>
>><br>
>> On Tue, May 10, 2011 at 11:39 PM, Marc Delisle <<a href="mailto:marc@infomarc.info">marc@infomarc.info</a>> wrote:<br>
>>><br>
>>> Madhura Jayaratne a écrit :<br>
>>> > Hi all,<br>
>>> ><br>
>>> > During the past few days I was playing around with the code to do a<br>
>>> > test<br>
>>> > implementation for GIS data visualization. Now I have pushed it to my<br>
>>> > repo and I would like to hear you comments about it. You can check it<br>
>>> > out at [1].<br>
>>> ><br>
>>> > Currently it does the following<br>
>>> > 1. 'Visualize GIS data' link is displayed in 'Query results options'<br>
>>> > pane ONLY for query results that has atleast one geometric column.<br>
>>> > 2. If there are more than one geometric columns in the results, the<br>
>>> > user<br>
>>> > can chose which column to be used for th visualization<br>
>>> > 3. You chose out of non-geometric columns a label column, which is used<br>
>>> > for tooltips.<br>
>>> > 4. Also, try zooming and panning.<br>
>>> ><br>
>>> > I created a database with geometric data (database: opengis), so it<br>
>>> > would be easy for you to test the above. In case database server has<br>
>>> > reset by the time you login and you can't find the database, I have<br>
>>> > also<br>
>>> > attached the sql file here.<br>
>>> ><br>
>>><br>
>>> Madhura,<br>
>>> no file was attached but I suggest opening a patch artifact and<br>
>>> attaching your file there.<br>
>>><br>
>> Ooops!!<br>
>> I opened a patch artifact and attached the sql file there. You can find it<br>
>> at [1]<br>
>><br>
><br>
> One problem I encountered during the implementation is that flot does not<br>
> support drawing polygons with voids inside them. I had to draw another<br>
> polygon with its fill color set to background color in order to pretend the<br>
> void and i'm not vary happy with that :(<br>
> However reading the SVG specification I didn't find it to support polygons<br>
> with voids either [1]. I'm wondering what to do about that.<br>
<br>
</div></div>What do you mean by "polygons with voids"? It you mean that you need a<br>
polygon's outline, use <polyline> with the first point repeated at the<br>
end, this should do the trick.<br>
<br></blockquote><div> </div></div>In a polygon object like <div><span class="Apple-style-span" style="font-family: sans-serif; -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; font-size: 13px; ">POLYGON((35 10,10 20,15 40,45 45,35 10),(20 30,35 35,30 20,20 30))</span></div>
<div><font class="Apple-style-span" face="sans-serif"><span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px;"><span class="Apple-style-span" style="font-size: 13px; ">(35 10,10 20,15 40,45 45,35 10) refers to the outer ring while </span><span class="Apple-style-span" style="font-size: 13px; ">(20 30,35 35,30 20,20 30) refers to the inner ring. </span></span></font></div>
<div><font class="Apple-style-span" face="sans-serif"><span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px;"><span class="Apple-style-span" style="font-size: 13px; ">A polygon has exactly one outer ring and zero or more inner rings.</span></span></font></div>
<div><font class="Apple-style-span" face="sans-serif"><span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px;"><br></span></font></div><div><font class="Apple-style-span" face="sans-serif"><span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px;">When visualizing the polygon, area under the outer ring, but not under any inner rings should be colored.</span></font></div>
<div><font class="Apple-style-span" face="sans-serif"><span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px;"><br></span></font></div><div><font class="Apple-style-span" face="sans-serif"><span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px;">So the hack I have used is, I have drawn the outer ring and on top of that drawn the inner rings with the background color. You can find a polygon which has inner rings in the dataset I have uploaded to the demo. (database: opengis, table:gis_all)</span></font></div>
<div><font class="Apple-style-span" face="sans-serif"><span class="Apple-style-span" style="-webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px;"><br></span></font>-- <br>Thanks and Regards,<div><br>
</div><div>Madhura Jayaratne<br><div><br></div></div><br>
</div>