void setPadWithZeros(boolean padWithZeros) { geometryTranslator = createGeometryTranslator( handler, geometryTranslator.getNumDecimals(), padWithZeros, geometryTranslator.getForceDecimalEncoding()); }
/** If set to 3 the real z value from the coordinates will be used */ void setDimension(int dimension) { geometryTranslator = createGeometryTranslator( handler, geometryTranslator.getNumDecimals(), geometryTranslator.getPadWithZeros(), geometryTranslator.getForceDecimalEncoding(), dimension); }
void setNumDecimals(int numDecimals) { geometryTranslator = createGeometryTranslator( handler, numDecimals, geometryTranslator.getPadWithZeros(), geometryTranslator.getForceDecimalEncoding()); }
public GeometryTranslator( ContentHandler handler, String prefix, String nsUri, int numDecimals, boolean padWithZeros, boolean forceDecimalEncoding) { this(handler, prefix, nsUri); coordWriter = new CoordinateWriter(numDecimals, padWithZeros, forceDecimalEncoding, false); coordWriter.setPrefix(prefix); coordWriter.setNamespaceUri(nsUri); }
void setForceDecimalEncoding(boolean forceDecimalEncoding) { geometryTranslator = createGeometryTranslator( handler, geometryTranslator.getNumDecimals(), geometryTranslator.getPadWithZeros(), forceDecimalEncoding); }
public GeometryTranslator(ContentHandler handler, String prefix, String nsUri) { super(handler, prefix, nsUri); coordWriter.setPrefix(prefix); coordWriter.setNamespaceUri(nsUri); }
/** @TODO remove constant from GometryTraslator contructor call */ public org.geotools.xml.transform.Translator createTranslator(ContentHandler handler) { return new GeometryTranslator( handler, numDecimals, padWithZeros, forceDecimalEncoding, useDummyZ); }
/** * Encodes the geometry in plain 2D using the given srsName attribute value * * @see #encode(Geometry, String, int) */ public void encode(Geometry geometry, String srsName) { encode(geometry, srsName, 2); }
/** * Creates a Translator that is capable to translate FeatureType objects into a XML schema * fragment. * * @param handler the content handler to use * @return DOCUMENT ME! */ public Translator createTranslator(ContentHandler handler) { FeatureTypeTranslator translator = new FeatureTypeTranslator(handler); return translator; }
/** Template method for creating the translator. */ protected FeatureTranslator createTranslator( ContentHandler handler, String prefix, String ns, FeatureTypeNamespaces featureTypeNamespaces, SchemaLocationSupport schemaLocationSupport) { return new FeatureTranslator( handler, prefix, ns, featureTypeNamespaces, schemaLocationSupport); }
/** * Sends sax for the ending of a feature collection. * * @param collection Feature collection we have just finished encoding */ public void endFeatureCollection(FeatureCollection<?, ?> collection) { endFeatureCollection(); }
public void endFeatureCollection() { end(fc); }
public int getNumDecimals() { return coordWriter.getNumDecimals(); }
public boolean isDummyZEnabled() { return coordWriter.isDummyZEnabled(); }
public int getNumDecimals() { return coordFormatter.getMaximumFractionDigits(); }
public boolean getForceDecimalEncoding() { return coordFormatter.isForcedDecimal(); }
public boolean getPadWithZeros() { return coordWriter.getPadWithZeros(); }
void setUseDummyZ(boolean useDummyZ) { geometryTranslator = createGeometryTranslator( handler, geometryTranslator.getNumDecimals(), geometryTranslator.getPadWithZeros(), geometryTranslator.getForceDecimalEncoding(), useDummyZ); }
protected GeometryTranslator createGeometryTranslator( ContentHandler handler, int numDecimals, boolean padWithZeros, boolean forceDecimalEncoding) { return new GeometryTransformer.GeometryTranslator( handler, numDecimals, padWithZeros, forceDecimalEncoding); } /**
public void encode(Object o) throws IllegalArgumentException { encode(o, null); }