My issues with v2.0

Topics: SharpMap v2.0
Coordinator
Jun 13, 2008 at 10:41 AM
Hello,

I'm trying to get accustomed to the v2.0 of SharpMap. So far I've been able to adapt my data providers and been able to render the geometries on WinForms.
This is what I stumbled upon:

The first call to "RenderAllLayers" is faster than all subsequent calls (given that the viewport doesn't change much). I think it's due to the way that geometries are compared in "FeatureDataRow.Geometry" setter. ReferenceEquals returns false for the newly read geometry. Perhaps comparing a hashvalue would be better? Furthermore there seems to be a problem with the spatial index used in the ShapeFile-Provider. In the subsequent calls to RenderFeatureLayer the "findLeastExpandedChild"-function of "GuttmanQuadraticInsert" class encounters children with Bound=null.

The _selectedFeatures and the _highlightedFeatures both return all features after FeatureLayer is initialized. Is that supposed to be like that?

Nevertheless, thanks for the great effort.

FObermaier
Coordinator
Jun 13, 2008 at 10:53 AM
Edited Jun 13, 2008 at 11:00 AM
Hi FObermaier  there have been a couple of changes recently in GeoAPI and Sharpmap regarding SpatialIndexing - i dont know if they are related to your issue but it may be worth updating to the latest version (if you havent already)..

i think _selectedFetaures and _highligtedFeatures are still work in progress.. 
cheers jd
Coordinator
Jun 13, 2008 at 4:41 PM
Edited Jun 13, 2008 at 4:42 PM
Hey FObermaier -

I've been fixing these exact issues over the past few days. John's right, try with the latest source. In general, we move pretty fast on large blocking issues on v2.0. If your source code is more than a few days old, it is probably already fixed.

Edit: oh, but don't let that stop you from reporting issues!
Coordinator
Jun 16, 2008 at 11:18 AM
Edited Jun 18, 2008 at 7:49 AM


codekaizen wrote:
Hey FObermaier -

I've been fixing these exact issues over the past few days. John's right, try with the latest source. In general, we move pretty fast on large blocking issues on v2.0. If your source code is more than a few days old, it is probably already fixed.

Edit: oh, but don't let that stop you from reporting issues!

Hello,

I've updated/reverted Sharpmap, GeoAPI and NTS this morning, but the problems remain. I've tested the ShapeFileProvider with the BCROADS.shp, too, and ran into the same problems.
Does it matter that I'm using VS2005?

In addition to the indexing problem I've the problem that the ShapeFileProvider doesn't notice when the ShapeFileDataReader is done reading (see http://www.codeplex.com/SharpMap/Thread/View.aspx?ThreadId=28885)

Again, thanks for the great effort
FObermaier


Edit: The
- indexing problems
- _selectedFeatures and _highlightedFeatures
are resolved as of 2008/06/18.
Thank you
FObermaier



Coordinator
Jun 19, 2008 at 8:37 AM
Edited Jun 19, 2008 at 9:43 AM
Hello,
I don't know if problems regarding ManagedBufferedCoordinate2D belong here, but i think the

ICoordinate[] ICoordinateSequence.ToArray()

and the

BufferedCoordinate2D[] ToArray()

functions are missing calls to transformIndex(...). Once items were removed from the beginning or from within the sequence the returned array is wrong.

FObermaier
Coordinator
Jun 21, 2008 at 2:13 AM
Hey FObermaier -

Thanks for pointing these out. I'll look into them over the coming week.
Coordinator
Jun 21, 2008 at 2:14 AM
Oh, also, I had not checked in the fixes to the initial problem in this thread when I made the first reply. Try again, if you haven't already, and the problem should be resolved.