[Mapserver-users] Re: problem getting bounds of poly shape

Puneet Kishor pkishor at geoanalytics.com
Mon Sep 22 09:52:42 EDT 2003


Actually Palle Due Larsen's tip worked. I have to first call  
$shpObj->setBounds... then $shpObj->{bounds} returns values happily.

What I would like to know is how Palle knew this... where in the docs  
could I have read this?

I've said this before, and I know that I am on extremely thin grounds  
saying this again because I myself have done very little to contribute  
to it, but Lowell, the Perl/MapScript documentation is really really in  
need of more work.

Since you are the one who has done probably the most amount of work on  
this -- first, a resounding thanks to you. But a close second, how, oh  
how, can we improve the docs?

I've added the above tip to the wiki... perhaps that is the best way to  
increase the quality and quantity of documentation. But the docs are  
getting fragmented -- besides the versioning (different commands for  
3.5, 3.6, 4.0) there is the mapfile reference, the mapscript reference,  
and the wiki to look at besides the email archives. Any ideas on how to  
bring all this together into one consolidated, intuitive whole? A  
user's manual? Is that what a wiki is already doing?

Simply adding readymade scripts is not going to help because every app  
is ever so slightly different.

But, once again -- thanks Lowell for all your effort in documenting.


On Monday, September 22, 2003, at 08:09  AM, Lowell Filak wrote:

> I have not tried it with 4 yet, however I actually had a bug in one of
> the postings in the wiki which draws a circle and never closes back on
> the starting point which could have left the shape open but it didn't.
> I don't think that shapes are as rigid as "polygons" in say, coverages,
> so making sure they are closed may not be as critical.
> The same issue seems to have appeared in the PHP code also, see:
> http://lists.gis.umn.edu/pipermail/mapserver-users/2003-February/ 
> 001527.html
> but I'm not sure there is an answer as the original bug is reportedly
> fixed in PHP but being it has happened in Perl now this may be an issue
> somewhere deeper in the MS code itself.
> You should add this to bugzilla and then as a temporary fix write the
> shape to a shapefile to retrieve the bounds.
> Lowell
>
> The following message was sent by "pkishor_98"
> <pkishor at geoanalytics.com> on Sun, 21 Sep 2003 18:02:30 -0000.
>
>> replying to my own question -- I might not be drawing a correctly
> closed shape...
>> hence no legit rectObj. Corollary question -- do I have to explicitly
> close a shape to
>> make a legit poly? Assuming the answer to that is a resounding "yes",
> is there a way
>> to test whether a shape is a legit poly other than attempting to get
> its bounds and
>> seeing if anything is returned?
>>
>> --- In mapserver-users at yahoogroups.com, "pkishor_98" <pkishor at g...>  
>> wrote:
>>> I am drawing a shape on a poly layer like so...
>>>
>>> my $shpObj = new mapscript::shapeObj($mapscript::MS_SHAPE_POLYGON);
>>> adding a few lines with points (of course) and drawing it. The shape
> is drawing fine
>>> and showing up on the graphic, but I can't get its bounds.
>>>
>>> The bounds show up as -1 -1 -1 -1 via $shpObj->{bounds}->{minx} etc.
> I am at
>> my
>>> wits end here... any idea what is going on?
>>>
>>> Tia.
>>>
>>> _______________________________________________
>>> Mapserver-users mailing list
>>> Mapserver-users at l...
>>> http://lists.gis.umn.edu/mailman/listinfo/mapserver-users
>>
>> _______________________________________________
>> Mapserver-users mailing list
>> Mapserver-users at lists.gis.umn.edu
>> http://lists.gis.umn.edu/mailman/listinfo/mapserver-users
>




More information about the mapserver-users mailing list