Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I need to find out orientation of buildings and perform simplification of sides of buildings with a tolerance. I came to know from StackExchange that OpenCarto has useful libraries for geometrical functions.Basically i have stored data in PostGIS. Is there any possibility to use Opencarto Java Library to perform this on buildings? I thinks it is possible to connect Java with PostGIS through JDBC driver.

Cheers, Sanjeewa.

share|improve this question

Personnally I did it (general orientation calculation see here and there) from shapefiles using geotools library and opencarto. Opencarto's devloper (Jul) could maybe help you, if needed.

By the way, here you will find a JDBC sample to retrieve Postgis data.

share|improve this answer
Thanks for the information. Will it be possible to use Opencarto library with Netbeans other than eclipse? – Sanjeewa Jul 17 '11 at 11:02
I'm not a java expert, but for sure Opencarto is not dependant to any IDE! Using Netbeans will not cause any issue. – simo Jul 17 '11 at 11:05
Thanks for info. I will try Geotools with Netbeans. Please let me know what have you developed with Geotools for orientation? – Sanjeewa Jul 17 '11 at 11:18
I just wanted to know the smallest MBR to get the main orientation of buildings. Opencarto has a native method for that! – simo Jul 17 '11 at 11:33
Oh it is very nice. Could you please let me know how to use it. Me too needs to calculate orientation of buildings? – Sanjeewa Jul 17 '11 at 11:39

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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