GeoTools

createSchema needs the CRS's valid coordinate range

Details

  • Type: Task Task
  • Status: Open Open
  • Priority: Critical Critical
  • Resolution: Unresolved
  • Affects Version/s: 2.1.0
  • Fix Version/s: 2.7.5
  • Component/s: arcsde plugin
  • Labels:
    None

Description

At featuretype creation time, a SeLayer must be created, which should contain CRS information. This is easily parseable from the CoordinateReferenceSystem's WKT, but the valid coordinate range is critical to let arcsde correctly calculate the coordinate precision.

I tryed to create a "generic enough" coordinate range, but it seems impossible since, for example, UTM and Lat Lot coordinates are so disparate and needs different levels of accuracy and range.

So the first step would be to setup a real EPSG database and extract this information as explained by Martin:

Extent area = crs.getValidArea();
if (area != null) {
GeographicExtent ge = extent.getGeographicElement();
if (ge instanceof GeographicBoundingBox) { GeographicBoundingBox box = (GeographicBoundingBox) ge; double xmin = box.getWestBoundLongitude(); double xmax = box.getEastBoundLongitude(); // etc... }
}

Activity

Hide
Andrea Aime added a comment -
Quite the old issue. We do have a EPSG database that contains the info, it's the one you used for the GS preview. Wondering if that is enough to close this one?
Show
Andrea Aime added a comment - Quite the old issue. We do have a EPSG database that contains the info, it's the one you used for the GS preview. Wondering if that is enough to close this one?

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated: