title: Java GeoTools - Getting CRS from SRID
body: <p>I might confuse between two things, but I need to do some calculation on my polygons (distance, area etc.). Using the WKBReader, I'm getting the geo:</p>
  
  <pre><code>WKBReader wkbReader = new WKBReader();
  byte[] a = results.getBytes(8);
  Geometry geo = wkbReader.read(results.getBytes("st_asbinary"));
  </code></pre>
  
  <p>But I'm not getting it in EPSG:4326. I want to use GeoTools to do the transform. How do I get the CRS from the geo object? (look at the 3 question marks)</p>
  
  <pre><code>CoordinateReferenceSystem sourceCRS = ???
  CoordinateReferenceSystem targetCRS = CRS.decode("EPSG:4326");
  </code></pre>
  
  <p>MathTransform transform = CRS.findMathTransform(sourceCRS, targetCRS);
  Geometry targetGeometry = JTS.transform(geo, transform);
  Any help will be appreciated.</p>