Re[fdo-users] turn geometries

surrounded Rob.Sosnowski at itd.idaho.gov
Wed Sep 17 13:50:49 EDT 2008


OK, so I feel dumb - it struck me that the reason this is happening because I
reset the value of the byte[] array everytime I go through the loop.  It's
not that only one is being returned, its that I rewrite the byte[]
everytime.

Perhaps I'm too close to this code - thanks for the help, sorry for wasting
your time.

 


Dan Stoica wrote:
> 
>> This should be something like "Point(-116.925 44.058, -116.xxx
>> 44.xxx......)"
> 
> Sorry, I don't really understand this. A point with multiple positions?!
> 
> -----Original Message-----
> From: fdo-users-bounces at lists.osgeo.org
> [mailto:fdo-users-bounces at lists.osgeo.org] On Behalf Of surrounded
> Sent: Wednesday, September 17, 2008 12:35 PM
> To: fdo-users at lists.osgeo.org
> Subject: RE: Re[fdo-users] turn geometries
> 
> 
> Well, there is only one geometry returned.  So for example, if I step
> through
> the program (using C#.net) the point shapefile I referred to returns the
> following from the CreateGeometryFromFgf:
> 
> "Point(-116.925 44.058)" for the text.  This should be something like
> "Point(-116.925 44.058, -116.xxx 44.xxx......)"
> 
> 
> 
> Gavin Cramer wrote:
>>
>> So... is the problem that ReadNext() only returns 'true' once, or that
>> all
>> geometries have the same value?
>>
>> Gavin
>>
>>
>> -----Original Message-----
>> From: fdo-users-bounces at lists.osgeo.org
>> [mailto:fdo-users-bounces at lists.osgeo.org] On Behalf Of surrounded
>> Sent: Wednesday, September 17, 2008 12:24 PM
>> To: fdo-users at lists.osgeo.org
>> Subject: RE: Re[fdo-users] turn geometries
>>
>>
>> For instance, there are 44 counties within one shapefile - it only
>> returns
>> one.  There are 100+ points in another shapefile, it only returns one.
>>
>> NOTE: pcoords holds the geometry from GetGeometry - it is type byte[].  I
>> acutally pass this byte[] into another function to convert it into
>> geometry
>> with CreateGeometryFromFgf.  That is why the code is not clear with the
>> loop
>> and the definition of pcoords.
>>
>> Thanks....
>>
>>
>>
>> Dan Stoica wrote:
>>>
>>> I don't see any problem with that loop. Unless you get somehow an
>>> exception and the loop beaks after the 1st retrieval. But you say you
>>> get
>>> successfully one feature. So just to make sure: how many features are in
>>> the SHP file?
>>>
>>> -----Original Message-----
>>> From: fdo-users-bounces at lists.osgeo.org
>>> [mailto:fdo-users-bounces at lists.osgeo.org] On Behalf Of surrounded
>>> Sent: Wednesday, September 17, 2008 11:45 AM
>>> To: fdo-users at lists.osgeo.org
>>> Subject: Re[fdo-users] turn geometries
>>>
>>>
>>> Using shapefiles,  trying to return all geometries for all features
>>> within
>>> the shapefile.  Using the logic below, the geometry is returned for only
>>> one
>>> of the features within the shapefile.  How do I expand this logic to
>>> return
>>> all geometries.   Thanks....
>>>
>>> *******************************************
>>> OSGeo.FDO.Commands.Feature.ISelect sel =
>>> (OSGeo.FDO.Commands.Feature.ISelect)connection.CreateCommand(OSGeo.FDO.Commands.CommandType.CommandType_Select);
>>> sel.SetFeatureClassName(sSplit[1]);      //Where sSplit[1] is the name
>>> of
>>> the shapefile
>>> reader = sel.Execute();
>>>
>>> while (reader.ReadNext())
>>> {
>>>     pCoords = reader.GetGeometry("Geometry");
>>>     FgfGeometryFactory gFac = new FgfGeometryFactory();
>>>     IGeometry geo = gFac.CreateGeometryFromFgf(pCoords);
>>> }
>>> --
>>> View this message in context:
>>> http://n2.nabble.com/Return-geometries-tp1095647p1095647.html
>>> Sent from the FDO Users mailing list archive at Nabble.com.
>>>
>>> _______________________________________________
>>> fdo-users mailing list
>>> fdo-users at lists.osgeo.org
>>> http://lists.osgeo.org/mailman/listinfo/fdo-users
>>> _______________________________________________
>>> fdo-users mailing list
>>> fdo-users at lists.osgeo.org
>>> http://lists.osgeo.org/mailman/listinfo/fdo-users
>>>
>>>
>>
>> --
>> View this message in context:
>> http://n2.nabble.com/Return-geometries-tp1095647p1095772.html
>> Sent from the FDO Users mailing list archive at Nabble.com.
>>
>> _______________________________________________
>> fdo-users mailing list
>> fdo-users at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/fdo-users
>> _______________________________________________
>> fdo-users mailing list
>> fdo-users at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/fdo-users
>>
>>
> 
> --
> View this message in context:
> http://n2.nabble.com/Return-geometries-tp1095647p1095800.html
> Sent from the FDO Users mailing list archive at Nabble.com.
> 
> _______________________________________________
> fdo-users mailing list
> fdo-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/fdo-users
> _______________________________________________
> fdo-users mailing list
> fdo-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/fdo-users
> 
> 

-- 
View this message in context: http://n2.nabble.com/Return-geometries-tp1095647p1095966.html
Sent from the FDO Users mailing list archive at Nabble.com.



More information about the fdo-users mailing list