[mapguide-internals] I'm sure I'm just missing something...

Jason Birch Jason.Birch at nanaimo.ca
Thu Apr 5 11:21:36 EDT 2007


[moving to -internals]

I though I might have just been missing a step, or my geometry (or the
geometry + CS combination) was bad and the MgWktReaderWriter->Read() was
not throwing an exception.

If it's a defect in the code rather than in my logic, then I have to
learn to give up a bit earlier :)

Jason 

-----Original Message-----
From: mapguide-users-bounces at lists.osgeo.org
[mailto:mapguide-users-bounces at lists.osgeo.org] On Behalf Of Walt
Welton-Lair
Sent: Thursday, April 05, 2007 03:02
To: MapGuide Users Mail List
Subject: RE: [mapguide-users] I'm sure I'm just missing something...

There actually is a small typo in one of our SWIG input files
(MapGuideApiGen.xml):

    ...
    <Header path="../../../Common/Geometry/Transform.h"/>
    <Header path="../../../Common/Geometry/GeometricEntity.h"/>/>
    <Header path="../../../Common/Geometry/Geometry.h"/> 
    ...

There's an extra closing bracket right before Geometry.h where the
MgGeometry type is defined.

Unfortunately fixing this didn't make any difference as far as the
autogenerated SWIG code, so the problem must lie somewhere else.

I've entered a ticket for this
(http://trac.osgeo.org/mapguide/ticket/35).  Someone needs to
investigate these PHP issues, since it's possible other parts of the PHP
API have a similar problem.

Walt

-----Original Message-----
From: mapguide-users-bounces at lists.osgeo.org
[mailto:mapguide-users-bounces at lists.osgeo.org] On Behalf Of Walt
Welton-Lair
Sent: Thursday, April 05, 2007 11:31 AM
To: MapGuide Users Mail List
Subject: RE: [mapguide-users] I'm sure I'm just missing something...

This sounds similar to the problem Paul Spencer had with the
GeneratePlot method.  In his case the number of arguments didn't match
any overload, while in your case one of the arguments doesn't match the
expected type.

The code which does these checks is generated by SWIG
(PhpApi/MgApi_wrap.cpp), and it wouldn't be too hard to debug into it to
see what's going on.  Unfortunately I'm not set up for PHP at the moment
- maybe someone else can give this a try?

Maybe there's a bug in the autogenerated SWIG code or in our SWIG input?

Walt

-----Original Message-----
From: mapguide-users-bounces at lists.osgeo.org
[mailto:mapguide-users-bounces at lists.osgeo.org] On Behalf Of Jason Birch
Sent: Thursday, April 05, 2007 9:33 AM
To: mapguide-users at lists.osgeo.org
Subject: [mapguide-users] I'm sure I'm just missing something...

This:
 
http://www.jasonbirch.com/temp/test.phps
<http://www.jasonbirch.com/temp/test.phps> 
 
Gives me errors either way I run it (UTM to LL or LL to UTM).
 
Fatal error: Type error in argument 1 of MgWktReaderWriter_Write.
Expected _p_MgGeometry in C:\Program
Files\MapGuideOpenSource\WebServerExtensions\Apache2\htdocs\parcels\test
.php on line 42
 
It works just fine if I remove the transform as the second optional
parameter to the WKT reader.  The thing is that these same transforms
are working correctly on features that I'm reading directly from a
FeatureSource.  So what am I missing?
 
This is just a test case.  What I really want to do with the transformed
bounding box is something like:
 
$queryOptions->SetSpatialFilter("Geometry", $bboxUTM10,
MgFeatureSpatialOperations::EnvelopeIntersects);

I'm basically trying to take in a BBOX in LL, transform it to UTM10,
then use its envelope as a spatial filter.
 
Help appreciated, as always :)
 
Jason
_______________________________________________
mapguide-users mailing list
mapguide-users at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapguide-users

_______________________________________________
mapguide-users mailing list
mapguide-users at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapguide-users

_______________________________________________
mapguide-users mailing list
mapguide-users at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapguide-users


More information about the mapguide-internals mailing list