[Gdal-dev] Center of polygon

Mathieu mathieu_gdal at yahoo.fr
Fri Apr 16 05:21:26 EDT 2004


Martin,

Thank you for the "center of polygon" algorithm.

Could you please describe the pExtents parameter in the GetCenter method? 
In the code, it looks like you expect a 4 elements array. What mean those 4
values?

When displaying a polygon's label, it is important to take care of the
position of the polygon in the screen. That's why, I think, the
OGRPolygonLabelPoint (MITAB driver) is not enough for displaying a label.

Does your algorithm take accound of this "screen clipping" problem? (maybe
pExtent is related with that??)

Mat





-----Message d'origine-----
De : gdal-dev-admin at remotesensing.org
[mailto:gdal-dev-admin at remotesensing.org] De la part de Chapman, Martin
Envoyé : lundi 5 avril 2004 22:40
À : gdal-dev at remotesensing.org
Objet : RE: [Gdal-dev] Center of polygon

Bruce,

No problem, it's not perfect but it is pretty good for a starting point.
It will position 99 percent of the labels correctly.  If you improve it
or make bug fixes send me the code please.  If you have questions let me
know too. 

Martin

-----Original Message-----
From: Clay, Bruce [mailto:bclay at ball.com] 
Sent: Monday, April 05, 2004 2:22 PM
To: gdal-dev at remotesensing.org
Subject: RE: [Gdal-dev] Center of polygon


Martin:
  Many thanks a for the code.

Bruce
_______________________________________________
Gdal-dev mailing list
Gdal-dev at remotesensing.org
http://remotesensing.org/mailman/listinfo/gdal-dev
_______________________________________________
Gdal-dev mailing list
Gdal-dev at remotesensing.org
http://remotesensing.org/mailman/listinfo/gdal-dev




More information about the Gdal-dev mailing list