[postgis-users] Rounding the angle of the polygon

LuVar varga.lubomir at orangemail.sk
Mon Jan 21 01:44:08 PST 2008


Imho rounding angles could be done also by evolutionary algorithms.
Give it some good fitness function and output could be nice. Imho this
is the solution, which I have used, if I have the same problem. (sry
for english)

If the deviation of angles is small, try to render it in very big
raster. (100px x 100px). Aliasing off, could give nice map, which can
be after resized.

Another solution is to render normal, paste to gimp, and on new layer
paint new map by hand. (if it is only for some newsletter advertising
for example)


Monday, January 21, 2008, 9:04:43 AM, you wrote:

> Attila,

> I'm fully aware of the consequences of rounding the degrees of
> the corners, which will automatically change the coordinates of the
> corners, this due to the fact that the direction of the borderline
> will change.

> My first idea was(didnt make:
> - Calculate the original weighted center of the polygon
> - Describe the polygon as a ordered list of relative vectors (direction and length)
> - Round the angle's
> - Somehow fix the startpoint != endpoint (this should also give
> me a vector, which could be distributed evenly over the list of
> vectors, but i'm not sure if putting this in a loop it will end)
> - Calculate the new weighted center and put this polygon with the center on the old center.

> I now know that putting it outside the database is the way, i
> will now look which application/platform offers me the best tools.

> Thank you for your response!

> -----Oorspronkelijk bericht-----
> Van: postgis-users-bounces at postgis.refractions.net
> [mailto:postgis-users-bounces at postgis.refractions.net]Namens Attila
> Csipa
> Verzonden: 18 January 2008 15:27 PM
> Aan: PostGIS Users Discussion
> Onderwerp: Re: [postgis-users] Rounding the angle of the polygon


> On Thursday 17 January 2008 09:32:08 Witteveen, Eduard wrote:
>> 	Is there a way to round the angle of the corners to 90 degrees of a
>> polygon, where the corner is between 85 and 95 degrees? If this can't be
>> done in (pl)sql, what would be "the way" to do this?

> From what you say this won't be easy - you can't change the angles 
> of 'corners' unless you are altering the coords of the points (if you want to
> preserve straight sides for your polygons, that is). And if ARE changing the
> coordinates of the points, can you decide which points are on correct
> locations and which ones are skewed ?
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users


> ****************************************************************************
> Deze mail is gescand met McAfee Webshield en bevat geen virussen.

> Gemeente Aa en Hunze.
> ****************************************************************************


> ************************************************************************************************
> DISCLAIMER:
> Aan de informatie in deze e-mail en ieder aangehecht databestand kunnen geen rechten
> worden ontleend en de gemeente Aa en Hunze aanvaardt geen aansprakelijkheid voor
> schade als gevolg van onjuistheden en/of gedateerde informatie.

> Als u niet de bedoelde ontvanger bent wilt u dan dit bericht en ieder aangehecht
> databestand verwijderen en de afzender hiervan via e-mail op de hoogte stellen.
> ************************************************************************************************

> Deze mail is gescand met McAfee Webshield en bevat geen virussen.

> Gemeente Aa en Hunze.
 


-- 
Best regards,
 LuVar                            mailto:varga.lubomir at orangemail.sk




More information about the postgis-users mailing list