52North / IlwisCore

Integrated Land and Water Information System (ILWIS) is a remote sensing and GIS software. ILWIS Core is the functional center of ilwis4..
http://52north.org/communities/ilwis/
34 stars 13 forks source link

FeatureCoverage corrupts coordinatesystem #43

Closed ridoo closed 9 years ago

ridoo commented 10 years ago

When setting a coordinatesystem via _fcoverage->coordinateSystem(crs); a following _fcoverage->newFeature request fails with a SEGMENTATION_FAULT error.

ridoo commented 10 years ago

Not sure why setting the instance as IFeatureCoverage corrupts coordinate system of the feature coverage. Removing the accordling lines will fix the issue.

However, it should be double checked if other functionality is broken then!

ridoo commented 10 years ago

@MartinSchouwenburg see this branch which tackles this issue by removing the lines mentioned above.

ridoo commented 10 years ago

I merged the proposed changes to main branch. See c19e9ca1fb283c2dc5bac3449d28072ad28797ea

However, we should think of how kernel could handle not yet registered IlwisObjects as in the case above. Either by registering them on-the-fly or by documenting requirements on an IlwisObject's state when using it by the kernel.

MartinSchouwenburg commented 10 years ago

The general rule is, never use 'naked' IlwisObjects ( pointer) unless the system offers it to you. There is a reason why all IlwisObjects are created from connectors