/** * Returns the CRSCodeType that can be constructed from the string parameter. * * @param codeAsString * @return the parsed string as a code type * @throws IllegalArgumentException */ public static CRSCodeType valueOf( String codeAsString ) throws IllegalArgumentException { return new CRSCodeType( codeAsString ); }
/** * @return The code used when a {@link CRSIdentifiable} has no id. The code used is "NOT PROVIDED". */ public static CRSCodeType getUndefined() { return new CRSCodeType( "NOT PROVIDED" ); }
/** * @param sourceCRS * @param targetCRS */ public IdentityTransform( ICRS sourceCRS, ICRS targetCRS ) { super( sourceCRS, targetCRS, new CRSIdentifiable( new CRSCodeType( "id" ) ) ); }
public Map<String, String> getURIAsType( String uri ) throws IOException { String tmpID = getIDCode( uri ); if ( LOG.isDebugEnabled() ) { LOG.debug( "Given id: " + uri + " converted into: " + tmpID ); } Map<String, String> result = idToParams.get( new CRSCodeType( tmpID ) ); if ( result != null ) { result = new HashMap<String, String>( result ); } return result; }
/** * Create a new geographic crs with the same axis as the wgs. * * @param sourceCRS * @return a new crs with same axis as wgs84. */ public final static IGeographicCRS createWGSAlligned( IGeographicCRS sourceCRS ) { return new GeographicCRS( sourceCRS.getGeodeticDatum(), GeographicCRS.WGS84.getAxis(), new CRSCodeType( "wgsalligned" ) ); }
Transformation trInverse = tr.copyTransformation( new CRSIdentifiable( new CRSCodeType( newId ) ) ); trInverse.inverse(); result.add( trInverse );
CRSCodeType newCodeType = new CRSCodeType( "projection_for_" + oldCode.getOriginal() ); if ( db_id != null ) { int epsgCode = getEPSGCode( proj );
String targetCRS = XMLStreamUtils.getRequiredText( reader, new QName( CRS_NS, "TargetCRS" ), true ); ICRS src = getStore().getCRSByCode( new CRSCodeType( sourceCRS ) ); ICRS tar = getStore().getCRSByCode( new CRSCodeType( targetCRS ) ); if ( src == null ) { LOG.debug( reader.getLocation() + ") could not determine referenced source coordinate system." );
public List<CRSCodeType[]> getAvailableCRSIds() { List<OMElement> crsIDs = new LinkedList<OMElement>(); try { XPath xpath = new XPath( "//" + PRE + "dictionaryEntry/*[" + PRE + "ProjectedCRS|" + PRE + "CompoundCRS|" + PRE + "GeodeticCRS]", nsContext ); crsIDs.addAll( adapter.getElements( getRootElement(), xpath ) ); } catch ( XMLParsingException e ) { throw new CRSConfigurationException( Messages.getMessage( "CRS_CONFIG_GET_ALL_ELEMENT_IDS", e.getMessage() ), e ); } List<CRSCodeType[]> result = new ArrayList<CRSCodeType[]>(); for ( OMElement crs : crsIDs ) { if ( crs != null ) { String[] ids = adapter.getNodesAsStrings( crs, new XPath( PRE + "identifier", nsContext ) ); if ( ids != null ) { CRSCodeType[] r = new CRSCodeType[ids.length]; for ( int i = 0; i < ids.length; ++i ) { if ( ids[i] != null ) { r[i] = new CRSCodeType( ids[i] ); } } result.add( r ); } } } return result; }
/** * @return a CRSCodeType object based on the information in the AUTHORITY element * @throws IOException * if an I/O error occurs */ protected CRSCodeType parseAuthority() throws IOException { passOverWord( "AUTHORITY" ); passOverOpeningBracket(); String codespace = parseString(); passOverChar( ',' ); String code = parseString(); passOverClosingBracket(); return new CRSCodeType( code, codespace ); }
String newFirstId = firstTransform.getTargetCRS() + "_" + firstTransform.getSourceCRS() + "_copy"; Transformation firstT = firstTransform.copyTransformation( new CRSIdentifiable( new CRSCodeType( newFirstId ) ) ); Transformation secondTransform = ( (ConcatenatedTransform) this ).getSecondTransform(); String newSecondId = secondTransform.getTargetCRS() + "_" + secondTransform.getSourceCRS() + "_copy"; Transformation secondT = secondTransform.copyTransformation( new CRSIdentifiable( new CRSCodeType( newSecondId ) ) ); result = new ConcatenatedTransform( firstT, secondT );
@Override public Envelope[] getBoundingBox() { List<BoundingBox> bboxList = getParsedProfileElement().getQueryableProperties().getBoundingBox(); if ( getParsedProfileElement().getQueryableProperties().getCrs().isEmpty() ) { List<CRS> newCRSList = new LinkedList<CRS>(); for ( BoundingBox b : bboxList ) { newCRSList.add( new CRS( "4326", "EPSG", null ) ); } getParsedProfileElement().getQueryableProperties().setCrs( newCRSList ); } Envelope[] env = new Envelope[bboxList.size()]; int counter = 0; for ( BoundingBox box : bboxList ) { CRS bboxCRS = getParsedProfileElement().getQueryableProperties().getCrs().get( counter ); // convert to the deegree CRSCodeType - this is not nice! CRSCodeType crsCT; if ( bboxCRS.getAuthority() != null ) crsCT = new CRSCodeType( bboxCRS.getCrsId(), bboxCRS.getAuthority() ); else crsCT = new CRSCodeType( bboxCRS.getCrsId() ); ICRS crs = CRSManager.getCRSRef( crsCT.toString() ); env[counter++] = new GeometryFactory().createEnvelope( box.getWestBoundLongitude(), box.getSouthBoundLatitude(), box.getEastBoundLongitude(), box.getNorthBoundLatitude(), crs ); } return env; }
code = new CRSCodeType( name );
code = new CRSCodeType( name );
code = new CRSCodeType( name );
code = new CRSCodeType( name );
code = new CRSCodeType( name );
code = new CRSCodeType( name );
code = new CRSCodeType( name );
code = new CRSCodeType( name );