[mapguide-users] question Postgre Search tools php

MapasCatastro mapas at laplata.gov.ar
Tue May 8 14:56:15 EDT 2007


hi i try to modify the part of this script in php  but dont workme, i try to
create a search tool.

its ok this code to read from postgre??
thnks a lot 
oscar


            $featureResId = new
MgResourceIdentifier("Library://postgre/conectancia.FeatureSource");
            $queryOptions = new MgFeatureQueryOptions();
            $queryOptions->SetFilter($filter);

            $geometryReaderWriter = new MgAgfReaderWriter();
////////////////////////////
////// read from posgre
////////////////////////////
            $featureReader = $featureService->SelectFeatures($featureResId,
"OGRSchema:callesnodos", $queryOptions);

            $featureReader->ReadNext();
 

/////////////////////////////////
           
            $name = $featureReader->GetString('clave');  
////
////clave is the row in my table
////      
      $byteReader = $featureReader->GetGeometry('the_geom');

/////////////////////////////////////


            $geometry = $geometryReaderWriter->Read($byteReader);
            $point = $geometry->GetCentroid();
            $x = $point->GetCoordinate()->GetX();
            $y = $point->GetCoordinate()->GetY();
-- 
View this message in context: http://www.nabble.com/question-Postgre-Search-tools-php-tf3711540s16610.html#a10381798
Sent from the MapGuide Users mailing list archive at Nabble.com.



More information about the mapguide-users mailing list