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 want to calculate an intersection between two geometries with the intersection function from JTS Geometry. What happens, if the geometries have different SRIDs?

SimpleFeature sf1=...;      //SRID 31467
SimpleFeature sf2=...;      //SRID 4327

Geometry geom1 = (Geometry) sf1.getDefaultGeometry();
Geometry geom2 = (Geometry) sf2.getDefaultGeometry();

Geometry overlay = geom1.intersection(geom2);

Does the function calculate the intersection in respect to the different SRIDs or does it ignore it? Which SRID does the calculated geometry have?

I didn't find any documentation about that.

share|improve this question

As far as I know JTS does nothing with the SRID value (see this email). You will need to use GeoTools to reproject your features to a common projection and then call intersection on them. The result will then be in the common projection and you can then project back to one or both of the input projections.

share|improve this answer

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.