We have open a MapInfoTab File using OGRFeatureSource the file open on map successfully. But one question we have there is a function named GetStyleString in OGRLibrary of Ogr2Ogr but in our OGRSource the same method is not present. How we can override the same method. And one more thing if we have a Style feature wise means each feature has a different style is there any option to open style feature wise without creating a Rule.

1 Answer 1


Even if you could get the MapInfo style string out of the file it has no real value to GeoTools (at present).

If you want to style each feature differently the only way to do it is to construct an SLD object based on properties (attributes) of the features to control the styling, possibly with additional filtering (or judicious use of the if-then-else function).

  • thanks for this , but one more thing there is an explanation for all the functions in BridgeOgr in class OgrLibrary.java . What is the equivalent of all those methods present in that Class and how they load style on map? Mar 16, 2017 at 9:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.