### Instantiate Saba CRS Source: https://github.com/dvdoug/phpcoord/blob/master/docs/builtin_crs_geographic3d.md Examples for initializing the Saba coordinate reference system. ```php Geographic3D::fromSRID(Geographic3D::EPSG_SABA) Geographic3D::fromSRID('urn:ogc:def:crs:EPSG::10635') Geographic::fromSRID(Geographic3D::EPSG_SABA) Geographic::fromSRID('urn:ogc:def:crs:EPSG::10635') CoordinateReferenceSystem::fromSRID(Geographic3D::EPSG_SABA) CoordinateReferenceSystem::fromSRID('urn:ogc:def:crs:EPSG::10635') ``` -------------------------------- ### Initialize Geographic 3D Systems Source: https://github.com/dvdoug/phpcoord/blob/master/docs/reflection/coordinateoperation/geographic3d.txt Examples of initializing Geographic 3D coordinate systems from SRID constants. ```php Geographic3D::fromSRID(Geographic3D::EPSG_RGNC91_93_LON_LAT) ``` ```php Geographic3D::fromSRID(Geographic3D::EPSG_RGPF) ``` ```php Geographic3D::fromSRID(Geographic3D::EPSG_RGR92) ``` ```php Geographic3D::fromSRID(Geographic3D::EPSG_RGR92_LON_LAT) ``` ```php Geographic3D::fromSRID(Geographic3D::EPSG_RGRDC_2005) ``` ```php Geographic3D::fromSRID(Geographic3D::EPSG_RGSH2020) ``` ```php Geographic3D::fromSRID(Geographic3D::EPSG_RGSPM06) ``` -------------------------------- ### Initialize Beduaram CRS Source: https://github.com/dvdoug/phpcoord/blob/master/docs/reflection/coordinatereferencesystem/geographic2d.txt Examples for initializing the Beduaram coordinate system for Niger. ```php Geographic2D::fromSRID(Geographic2D::EPSG_BEDUARAM) Geographic2D::fromSRID('urn:ogc:def:crs:EPSG::4213') Geographic::fromSRID(Geographic2D::EPSG_BEDUARAM) Geographic::fromSRID('urn:ogc:def:crs:EPSG::4213') CoordinateReferenceSystem::fromSRID(Geographic2D::EPSG_BEDUARAM) CoordinateReferenceSystem::fromSRID('urn:ogc:def:crs:EPSG::4213') ``` -------------------------------- ### Instantiate SRGI2013 CRS Source: https://github.com/dvdoug/phpcoord/blob/master/docs/builtin_crs_geographic3d.md Examples for initializing the SRGI2013 coordinate reference system. ```php Geographic3D::fromSRID(Geographic3D::EPSG_SRGI2013) Geographic3D::fromSRID('urn:ogc:def:crs:EPSG::9469') Geographic::fromSRID(Geographic3D::EPSG_SRGI2013) Geographic::fromSRID('urn:ogc:def:crs:EPSG::9469') CoordinateReferenceSystem::fromSRID(Geographic3D::EPSG_SRGI2013) CoordinateReferenceSystem::fromSRID('urn:ogc:def:crs:EPSG::9469') ``` -------------------------------- ### Initialize Coordinate Reference Systems Source: https://github.com/dvdoug/phpcoord/blob/master/docs/reflection/coordinatereferencesystem/geographic2d.txt Examples of instantiating geographic coordinate systems using SRID constants or URN strings. ```php Geographic::fromSRID('urn:ogc:def:crs:EPSG::4810') CoordinateReferenceSystem::fromSRID(Geographic2D::EPSG_TANANARIVE_PARIS) CoordinateReferenceSystem::fromSRID('urn:ogc:def:crs:EPSG::4810') ``` ```php Geographic2D::fromSRID(Geographic2D::EPSG_TAPI_AIKE) Geographic2D::fromSRID('urn:ogc:def:crs:EPSG::9248') Geographic::fromSRID(Geographic2D::EPSG_TAPI_AIKE) Geographic::fromSRID('urn:ogc:def:crs:EPSG::9248') CoordinateReferenceSystem::fromSRID(Geographic2D::EPSG_TAPI_AIKE) CoordinateReferenceSystem::fromSRID('urn:ogc:def:crs:EPSG::9248') ``` ```php Geographic2D::fromSRID(Geographic2D::EPSG_TERN_ISLAND_1961) Geographic2D::fromSRID('urn:ogc:def:crs:EPSG::4707') Geographic::fromSRID(Geographic2D::EPSG_TERN_ISLAND_1961) Geographic::fromSRID('urn:ogc:def:crs:EPSG::4707') CoordinateReferenceSystem::fromSRID(Geographic2D::EPSG_TERN_ISLAND_1961) CoordinateReferenceSystem::fromSRID('urn:ogc:def:crs:EPSG::4707') ``` ```php Geographic2D::fromSRID(Geographic2D::EPSG_TETE) Geographic2D::fromSRID('urn:ogc:def:crs:EPSG::4127') Geographic::fromSRID(Geographic2D::EPSG_TETE) Geographic::fromSRID('urn:ogc:def:crs:EPSG::4127') CoordinateReferenceSystem::fromSRID(Geographic2D::EPSG_TETE) CoordinateReferenceSystem::fromSRID('urn:ogc:def:crs:EPSG::4127') ``` ```php Geographic2D::fromSRID(Geographic2D::EPSG_TIMBALAI_1948) Geographic2D::fromSRID('urn:ogc:def:crs:EPSG::4298') Geographic::fromSRID(Geographic2D::EPSG_TIMBALAI_1948) Geographic::fromSRID('urn:ogc:def:crs:EPSG::4298') CoordinateReferenceSystem::fromSRID(Geographic2D::EPSG_TIMBALAI_1948) CoordinateReferenceSystem::fromSRID('urn:ogc:def:crs:EPSG::4298') ``` ```php Geographic2D::fromSRID(Geographic2D::EPSG_TOKYO) Geographic2D::fromSRID('urn:ogc:def:crs:EPSG::4301') Geographic::fromSRID(Geographic2D::EPSG_TOKYO) Geographic::fromSRID('urn:ogc:def:crs:EPSG::4301') CoordinateReferenceSystem::fromSRID(Geographic2D::EPSG_TOKYO) CoordinateReferenceSystem::fromSRID('urn:ogc:def:crs:EPSG::4301') ``` ```php Geographic2D::fromSRID(Geographic2D::EPSG_TOKYO_1892) Geographic2D::fromSRID('urn:ogc:def:crs:EPSG::5132') Geographic::fromSRID(Geographic2D::EPSG_TOKYO_1892) Geographic::fromSRID('urn:ogc:def:crs:EPSG::5132') CoordinateReferenceSystem::fromSRID(Geographic2D::EPSG_TOKYO_1892) CoordinateReferenceSystem::fromSRID('urn:ogc:def:crs:EPSG::5132') ``` ```php Geographic2D::fromSRID(Geographic2D::EPSG_TRINIDAD_1903) Geographic2D::fromSRID('urn:ogc:def:crs:EPSG::4302') Geographic::fromSRID(Geographic2D::EPSG_TRINIDAD_1903) Geographic::fromSRID('urn:ogc:def:crs:EPSG::4302') CoordinateReferenceSystem::fromSRID(Geographic2D::EPSG_TRINIDAD_1903) CoordinateReferenceSystem::fromSRID('urn:ogc:def:crs:EPSG::4302') ``` ```php Geographic2D::fromSRID(Geographic2D::EPSG_TRISTAN_1968) Geographic2D::fromSRID('urn:ogc:def:crs:EPSG::4734') Geographic::fromSRID(Geographic2D::EPSG_TRISTAN_1968) Geographic::fromSRID('urn:ogc:def:crs:EPSG::4734') CoordinateReferenceSystem::fromSRID(Geographic2D::EPSG_TRISTAN_1968) CoordinateReferenceSystem::fromSRID('urn:ogc:def:crs:EPSG::4734') ``` -------------------------------- ### Initialize Geographic3D Systems Source: https://github.com/dvdoug/phpcoord/blob/master/docs/builtin_conversions_geographic3d.md Examples of initializing various 3D geographic coordinate systems using their respective SRID constants. ```php Geographic3D::fromSRID(Geographic3D::EPSG_ST_HELENA_TRITAN) ``` ```php Geographic3D::fromSRID(Geographic3D::EPSG_TGD2005) ``` ```php Geographic3D::fromSRID(Geographic3D::EPSG_TUREF) ``` ```php Geographic3D::fromSRID(Geographic3D::EPSG_TWD97) ``` ```php Geographic3D::fromSRID(Geographic3D::EPSG_UCS_2000) ``` -------------------------------- ### Instantiate Sint Eustatius CRS Source: https://github.com/dvdoug/phpcoord/blob/master/docs/builtin_crs_geographic3d.md Examples for initializing the Sint Eustatius coordinate reference system. ```php Geographic3D::fromSRID(Geographic3D::EPSG_SINT_EUSTATIUS) Geographic3D::fromSRID('urn:ogc:def:crs:EPSG::10735') Geographic::fromSRID(Geographic3D::EPSG_SINT_EUSTATIUS) Geographic::fromSRID('urn:ogc:def:crs:EPSG::10735') CoordinateReferenceSystem::fromSRID(Geographic3D::EPSG_SINT_EUSTATIUS) CoordinateReferenceSystem::fromSRID('urn:ogc:def:crs:EPSG::10735') ``` -------------------------------- ### Instantiate SWEREF99 CRS Source: https://github.com/dvdoug/phpcoord/blob/master/docs/builtin_crs_geographic3d.md Examples for initializing the SWEREF99 coordinate reference system. ```php Geographic3D::fromSRID(Geographic3D::EPSG_SWEREF99) Geographic3D::fromSRID('urn:ogc:def:crs:EPSG::4977') Geographic::fromSRID(Geographic3D::EPSG_SWEREF99) Geographic::fromSRID('urn:ogc:def:crs:EPSG::4977') CoordinateReferenceSystem::fromSRID(Geographic3D::EPSG_SWEREF99) CoordinateReferenceSystem::fromSRID('urn:ogc:def:crs:EPSG::4977') ``` -------------------------------- ### Instantiate TGD2005 CRS Source: https://github.com/dvdoug/phpcoord/blob/master/docs/builtin_crs_geographic3d.md Examples for initializing the TGD2005 coordinate reference system. ```php Geographic3D::fromSRID(Geographic3D::EPSG_TGD2005) Geographic3D::fromSRID('urn:ogc:def:crs:EPSG::5885') Geographic::fromSRID(Geographic3D::EPSG_TGD2005) Geographic::fromSRID('urn:ogc:def:crs:EPSG::5885') CoordinateReferenceSystem::fromSRID(Geographic3D::EPSG_TGD2005) CoordinateReferenceSystem::fromSRID('urn:ogc:def:crs:EPSG::5885') ``` -------------------------------- ### Initialize Geographic3D Reference Systems Source: https://github.com/dvdoug/phpcoord/blob/master/docs/reflection/coordinateoperation/geographic3d.txt Examples of initializing various ETRF Geographic3D reference systems using their SRIDs. ```php Geographic3D::fromSRID(Geographic3D::EPSG_ETRF2005) ``` ```php Geographic3D::fromSRID(Geographic3D::EPSG_ETRF2014) ``` ```php Geographic3D::fromSRID(Geographic3D::EPSG_ETRF2020) ``` ```php Geographic3D::fromSRID(Geographic3D::EPSG_ETRF89) ``` ```php Geographic3D::fromSRID(Geographic3D::EPSG_ETRF90) ``` ```php Geographic3D::fromSRID(Geographic3D::EPSG_ETRF91) ``` -------------------------------- ### Initialize CRS from SRID Source: https://github.com/dvdoug/phpcoord/blob/master/docs/reflection/coordinatereferencesystem/compound.txt Example of initializing a coordinate reference system using an OGC URN string. ```php CoordinateReferenceSystem::fromSRID('urn:ogc:def:crs:EPSG::9520') ``` -------------------------------- ### Instantiate TUREF CRS Source: https://github.com/dvdoug/phpcoord/blob/master/docs/builtin_crs_geographic3d.md Examples for initializing the TUREF coordinate reference system. ```php Geographic3D::fromSRID(Geographic3D::EPSG_TUREF) Geographic3D::fromSRID('urn:ogc:def:crs:EPSG::5251') Geographic::fromSRID(Geographic3D::EPSG_TUREF) Geographic::fromSRID('urn:ogc:def:crs:EPSG::5251') CoordinateReferenceSystem::fromSRID(Geographic3D::EPSG_TUREF) CoordinateReferenceSystem::fromSRID('urn:ogc:def:crs:EPSG::5251') ``` -------------------------------- ### Instantiate TWD97 CRS Source: https://github.com/dvdoug/phpcoord/blob/master/docs/builtin_crs_geographic3d.md Examples for initializing the TWD97 coordinate reference system. ```php Geographic3D::fromSRID(Geographic3D::EPSG_TWD97) Geographic3D::fromSRID('urn:ogc:def:crs:EPSG::3823') Geographic::fromSRID(Geographic3D::EPSG_TWD97) Geographic::fromSRID('urn:ogc:def:crs:EPSG::3823') CoordinateReferenceSystem::fromSRID(Geographic3D::EPSG_TWD97) CoordinateReferenceSystem::fromSRID('urn:ogc:def:crs:EPSG::3823') ``` -------------------------------- ### Initialize CRS from SRID Source: https://github.com/dvdoug/phpcoord/blob/master/docs/reflection/coordinatereferencesystem/geocentric.txt Example of initializing a CoordinateReferenceSystem using a URN string. ```php CoordinateReferenceSystem::fromSRID('urn:ogc:def:crs:EPSG::4890') ``` -------------------------------- ### Initialize RT38 CRS Source: https://github.com/dvdoug/phpcoord/blob/master/docs/reflection/coordinatereferencesystem/geographic2d.txt Examples for initializing the RT38 coordinate reference system using EPSG constants or URNs. ```php Geographic2D::fromSRID(Geographic2D::EPSG_RT38) Geographic2D::fromSRID('urn:ogc:def:crs:EPSG::4308') ``` -------------------------------- ### Initialize Datum from SRID Source: https://github.com/dvdoug/phpcoord/blob/master/docs/reflection/datum/datum.txt Use these examples to initialize specific geodetic datums when the datum is unknown or specific to a region. ```php Datum::fromSRID('urn:ogc:def:datum:EPSG::6054') ``` ```php Datum::fromSRID(Datum::EPSG_NOT_SPECIFIED_BASED_ON_INDONESIAN_NATIONAL_SPHEROID) Datum::fromSRID('urn:ogc:def:datum:EPSG::6021') ``` ```php Datum::fromSRID(Datum::EPSG_NOT_SPECIFIED_BASED_ON_INTERNATIONAL_1924_AUTHALIC_SPHERE) Datum::fromSRID('urn:ogc:def:datum:EPSG::6053') ``` ```php Datum::fromSRID(Datum::EPSG_NOT_SPECIFIED_BASED_ON_INTERNATIONAL_1924_ELLIPSOID) Datum::fromSRID('urn:ogc:def:datum:EPSG::6022') ``` ```php Datum::fromSRID(Datum::EPSG_NOT_SPECIFIED_BASED_ON_KRASSOWSKY_1940_ELLIPSOID) Datum::fromSRID('urn:ogc:def:datum:EPSG::6024') ``` ```php Datum::fromSRID(Datum::EPSG_NOT_SPECIFIED_BASED_ON_NWL_9D_ELLIPSOID) Datum::fromSRID('urn:ogc:def:datum:EPSG::6025') ``` ```php Datum::fromSRID(Datum::EPSG_NOT_SPECIFIED_BASED_ON_OSU86F_ELLIPSOID) Datum::fromSRID('urn:ogc:def:datum:EPSG::6032') ``` ```php Datum::fromSRID(Datum::EPSG_NOT_SPECIFIED_BASED_ON_OSU91A_ELLIPSOID) Datum::fromSRID('urn:ogc:def:datum:EPSG::6033') ``` ```php Datum::fromSRID(Datum::EPSG_NOT_SPECIFIED_BASED_ON_PLESSIS_1817_ELLIPSOID) Datum::fromSRID('urn:ogc:def:datum:EPSG::6027') ``` ```php Datum::fromSRID(Datum::EPSG_NOT_SPECIFIED_BASED_ON_STRUVE_1860_ELLIPSOID) Datum::fromSRID('urn:ogc:def:datum:EPSG::6028') ``` ```php Datum::fromSRID(Datum::EPSG_NOT_SPECIFIED_BASED_ON_WGS_72_ELLIPSOID) Datum::fromSRID('urn:ogc:def:datum:EPSG::6043') ``` ```php Datum::fromSRID(Datum::EPSG_NOT_SPECIFIED_BASED_ON_WGS_84_ELLIPSOID) Datum::fromSRID('urn:ogc:def:datum:EPSG::6030') ``` ```php Datum::fromSRID(Datum::EPSG_NOT_SPECIFIED_BASED_ON_WAR_OFFICE_ELLIPSOID) Datum::fromSRID('urn:ogc:def:datum:EPSG::6029') ``` ```php Datum::fromSRID(Datum::EPSG_NOUAKCHOTT_1965) Datum::fromSRID('urn:ogc:def:datum:EPSG::6680') ``` -------------------------------- ### Initialize PZ-90.02 CRS Source: https://github.com/dvdoug/phpcoord/blob/master/docs/builtin_crs_geographic2d.md Instantiate the PZ-90.02 reference system. ```php Geographic2D::fromSRID(Geographic2D::EPSG_PZ_90_02) Geographic2D::fromSRID('urn:ogc:def:crs:EPSG::9474') Geographic::fromSRID(Geographic2D::EPSG_PZ_90_02) Geographic::fromSRID('urn:ogc:def:crs:EPSG::9474') CoordinateReferenceSystem::fromSRID(Geographic2D::EPSG_PZ_90_02) CoordinateReferenceSystem::fromSRID('urn:ogc:def:crs:EPSG::9474') ``` -------------------------------- ### Compound CRS Examples Source: https://github.com/dvdoug/phpcoord/blob/master/docs/reflection/coordinatereferencesystem/compound.txt Examples for creating Compound CRS instances using SRID constants and string representations. ```APIDOC ## Compound CRS Creation ### Description Demonstrates creating Compound Coordinate Reference Systems using predefined constants and EPSG URNs. ### Method Static method calls on `Compound` and `CoordinateReferenceSystem` classes. ### Endpoint N/A (Local library usage) ### Parameters N/A ### Request Example ```php // Using EPSG constants for ETRS89 / NTM zone 15 + NN2000 height Compound::fromSRID(Compound::EPSG_ETRS89_NTM_ZONE_15_PLUS_NN2000_HEIGHT); CoordinateReferenceSystem::fromSRID(Compound::EPSG_ETRS89_NTM_ZONE_15_PLUS_NN2000_HEIGHT); // Using URN string for the same CRS Compound::fromSRID('urn:ogc:def:crs:EPSG::5955'); CoordinateReferenceSystem::fromSRID('urn:ogc:def:crs:EPSG::5955'); // Using EPSG constants for ETRS89 / NTM zone 15 + NN54 height Compound::fromSRID(Compound::EPSG_ETRS89_NTM_ZONE_15_PLUS_NN54_HEIGHT); CoordinateReferenceSystem::fromSRID(Compound::EPSG_ETRS89_NTM_ZONE_15_PLUS_NN54_HEIGHT); // Using URN string for the same CRS Compound::fromSRID('urn:ogc:def:crs:EPSG::6155'); CoordinateReferenceSystem::fromSRID('urn:ogc:def:crs:EPSG::6155'); ``` ### Response N/A (Local library usage, returns CRS objects) ``` -------------------------------- ### Polar Bounding Box Examples Source: https://github.com/dvdoug/phpcoord/blob/master/resources/papers/rfc7946.txt Examples of bbox representations for regions containing or touching the North and South Poles. ```JSON "bbox": [-180.0, minlat, 180.0, 90.0] ``` ```JSON "bbox": [-180.0, -90.0, 180.0, maxlat] ``` ```JSON "bbox": [westlon, minlat, eastlon, 90.0] ``` ```JSON "bbox": [westlon, -90.0, eastlon, maxlat] ``` -------------------------------- ### GeoJSON Bounding Box Examples Source: https://github.com/dvdoug/phpcoord/blob/master/resources/papers/rfc7946.txt Examples of the bbox member applied to Features and FeatureCollections in 2D and 3D coordinate systems. ```JSON { "type": "Feature", "bbox": [-10.0, -10.0, 10.0, 10.0], "geometry": { "type": "Polygon", "coordinates": [ [ [-10.0, -10.0], [10.0, -10.0], [10.0, 10.0], [-10.0, -10.0] ] ] } //... ``` ```JSON { "type": "FeatureCollection", "bbox": [100.0, 0.0, 105.0, 1.0], "features": [ //... ] } ``` ```JSON { "type": "FeatureCollection", "bbox": [100.0, 0.0, -100.0, 105.0, 1.0, 0.0], "features": [ //... ] } ``` -------------------------------- ### Antimeridian Bounding Box Examples Source: https://github.com/dvdoug/phpcoord/blob/master/resources/papers/rfc7946.txt Examples of bbox values for regions spanning the antimeridian, where the northeast longitude is less than the southwest longitude. ```JSON "bbox": [177.0, -20.0, -178.0, -16.0] ``` ```JSON "bbox": [-178.0, -20.0, 177.0, -16.0] ``` -------------------------------- ### Install PHPCoord using Composer Source: https://context7.com/dvdoug/phpcoord/llms.txt Install the core PHPCoord package and optional regional datapacks for enhanced accuracy using Composer. ```bash # Install core package composer require php-coord/php-coord # Optional: Install regional datapacks for higher accuracy composer require php-coord/datapack-europe composer require php-coord/datapack-northamerica composer require php-coord/datapack-oceania ``` -------------------------------- ### Initialize QND95 CRS Source: https://github.com/dvdoug/phpcoord/blob/master/docs/builtin_crs_geographic2d.md Instantiate the QND95 coordinate reference system. ```php Geographic2D::fromSRID(Geographic2D::EPSG_QND95) Geographic2D::fromSRID('urn:ogc:def:crs:EPSG::4614') Geographic::fromSRID(Geographic2D::EPSG_QND95) Geographic::fromSRID('urn:ogc:def:crs:EPSG::4614') CoordinateReferenceSystem::fromSRID(Geographic2D::EPSG_QND95) CoordinateReferenceSystem::fromSRID('urn:ogc:def:crs:EPSG::4614') ``` -------------------------------- ### Geocentric to NAD83(CSRS)v7 (Geographic3D) - Example Source: https://github.com/dvdoug/phpcoord/blob/master/docs/reflection/coordinateoperation/geocentric.txt Example of transforming coordinates from a geocentric system to NAD83(CSRS)v7 Geographic3D using the `geographicGeocentric` method in PHP. ```php $point->geographicGeocentric( to: Geographic3D::fromSRID(Geographic3D::EPSG_NAD83_CSRS_V7) ) ``` -------------------------------- ### NAD83(CSRS)v7 to NAD83(2011) (Geocentric) - Example Source: https://github.com/dvdoug/phpcoord/blob/master/docs/reflection/coordinateoperation/geocentric.txt Example of transforming coordinates from NAD83(CSRS)v7 to NAD83(2011) using the `positionVectorTransformation` method in PHP. ```php $point->positionVectorTransformation( to: Geocentric::fromSRID(Geocentric::EPSG_NAD83_2011), xAxisTranslation: new Metre(0), yAxisTranslation: new Metre(0), zAxisTranslation: new Metre(0), xAxisRotation: new ArcSecond(0), yAxisRotation: new ArcSecond(0), zAxisRotation: new ArcSecond(0), scaleDifference: new PartsPerBillion(0) ) ``` -------------------------------- ### Initialize SIRGAS_ES2007.8 Source: https://github.com/dvdoug/phpcoord/blob/master/docs/builtin_crs_geographic2d.md Instantiate the SIRGAS_ES2007.8 coordinate reference system. ```php Geographic2D::fromSRID(Geographic2D::EPSG_SIRGAS_ES2007_8) Geographic2D::fromSRID('urn:ogc:def:crs:EPSG::5393') Geographic::fromSRID(Geographic2D::EPSG_SIRGAS_ES2007_8) Geographic::fromSRID('urn:ogc:def:crs:EPSG::5393') CoordinateReferenceSystem::fromSRID(Geographic2D::EPSG_SIRGAS_ES2007_8) CoordinateReferenceSystem::fromSRID('urn:ogc:def:crs:EPSG::5393') ``` -------------------------------- ### Initialize PSD93 CRS Source: https://github.com/dvdoug/phpcoord/blob/master/docs/builtin_crs_geographic2d.md Instantiate the PSD93 reference system used in Oman. ```php Geographic2D::fromSRID(Geographic2D::EPSG_PSD93) Geographic2D::fromSRID('urn:ogc:def:crs:EPSG::4134') Geographic::fromSRID(Geographic2D::EPSG_PSD93) Geographic::fromSRID('urn:ogc:def:crs:EPSG::4134') CoordinateReferenceSystem::fromSRID(Geographic2D::EPSG_PSD93) CoordinateReferenceSystem::fromSRID('urn:ogc:def:crs:EPSG::4134') ``` -------------------------------- ### GeoJSON Feature Object Example Source: https://github.com/dvdoug/phpcoord/blob/master/resources/papers/rfc7946.txt An example of a GeoJSON Feature object, illustrating the use of foreign members like 'title'. Foreign members are not subject to GeoJSON semantics. ```json { "type": "Feature", "id": "f1", "geometry": {...}, "properties": {...}, "title": "Example Feature" } ``` -------------------------------- ### ITRF2020 to NAD83(CSRS)v8 (Geocentric) - Time Dependent Example Source: https://github.com/dvdoug/phpcoord/blob/master/docs/reflection/coordinateoperation/geocentric.txt Example of performing a time-dependent position vector transformation from ITRF2020 to NAD83(CSRS)v8 (Geocentric) in PHP. ```php $point->timeDependentPositionVectorTransformation( to: Geocentric::fromSRID(Geocentric::EPSG_ITRF2020), xAxisTranslation: new Metre(-1.0039), yAxisTranslation: new Metre(1.90961), zAxisTranslation: new Metre(0.54117), xAxisRotation: new ArcSecond(0.02678138), yAxisRotation: new ArcSecond(-0.00042027), zAxisRotation: new ArcSecond(0.01093206), scaleDifference: new PartsPerBillion(0.05109), rateOfChangeOfXAxisTranslation: new Rate(new Metre(-0.00079), new Year(1)), rateOfChangeOfYAxisTranslation: new Rate(new Metre(0.0007), new Year(1)), rateOfChangeOfZAxisTranslation: new Rate(new Metre(0.00124), new Year(1)), rateOfChangeOfXAxisRotation: new Rate(new ArcSecond(6.667E-5), new Year(1)), rateOfChangeOfYAxisRotation: new Rate(new ArcSecond(-0.00075744), new Year(1)), rateOfChangeOfZAxisRotation: new Rate(new ArcSecond(-5.133E-5), new Year(1)), rateOfChangeOfScaleDifference: new Rate(new PartsPerBillion(0.07201), new Year(1)), parameterReferenceEpoch: new Year(2010) ) ``` -------------------------------- ### Initialize Qoornoq 1927 CRS Source: https://github.com/dvdoug/phpcoord/blob/master/docs/builtin_crs_geographic2d.md Instantiate the Qoornoq 1927 coordinate reference system. ```php Geographic2D::fromSRID(Geographic2D::EPSG_QOORNOQ_1927) Geographic2D::fromSRID('urn:ogc:def:crs:EPSG::4194') Geographic::fromSRID(Geographic2D::EPSG_QOORNOQ_1927) Geographic::fromSRID('urn:ogc:def:crs:EPSG::4194') CoordinateReferenceSystem::fromSRID(Geographic2D::EPSG_QOORNOQ_1927) CoordinateReferenceSystem::fromSRID('urn:ogc:def:crs:EPSG::4194') ``` -------------------------------- ### NAD83(CSRS)v7 to NAD83(CSRS)v8 (Geocentric) - Example Source: https://github.com/dvdoug/phpcoord/blob/master/docs/reflection/coordinateoperation/geocentric.txt Example of transforming coordinates from NAD83(CSRS)v7 to NAD83(CSRS)v8 using the `positionVectorTransformation` method in PHP. ```php $point->positionVectorTransformation( to: Geocentric::fromSRID(Geocentric::EPSG_NAD83_CSRS_V8), xAxisTranslation: new Metre(0), yAxisTranslation: new Metre(0), zAxisTranslation: new Metre(0), xAxisRotation: new ArcSecond(0), yAxisRotation: new ArcSecond(0), zAxisRotation: new ArcSecond(0), scaleDifference: new PartsPerBillion(0) ) ``` -------------------------------- ### Initialize QazTRF-23 CRS Source: https://github.com/dvdoug/phpcoord/blob/master/docs/builtin_crs_geographic2d.md Instantiate the QazTRF-23 coordinate reference system. ```php Geographic2D::fromSRID(Geographic2D::EPSG_QAZTRF_23) Geographic2D::fromSRID('urn:ogc:def:crs:EPSG::10941') Geographic::fromSRID(Geographic2D::EPSG_QAZTRF_23) Geographic::fromSRID('urn:ogc:def:crs:EPSG::10941') CoordinateReferenceSystem::fromSRID(Geographic2D::EPSG_QAZTRF_23) CoordinateReferenceSystem::fromSRID('urn:ogc:def:crs:EPSG::10941') ``` -------------------------------- ### Instantiate SIRGAS_ES2007.8 Source: https://github.com/dvdoug/phpcoord/blob/master/docs/builtin_datums.md Use the datum constant or URN to initialize the SIRGAS_ES2007.8 datum. ```php Datum::fromSRID(Datum::EPSG_SIRGAS_ES2007_8) Datum::fromSRID('urn:ogc:def:datum:EPSG::1069') ``` -------------------------------- ### NAD83(CSRS)v6 to NAD83(CSRS)v7 (Geocentric) - Example Source: https://github.com/dvdoug/phpcoord/blob/master/docs/reflection/coordinateoperation/geocentric.txt Example of transforming coordinates from NAD83(CSRS)v6 to NAD83(CSRS)v7 using the `positionVectorTransformation` method in PHP. ```php $point->positionVectorTransformation( to: Geocentric::fromSRID(Geocentric::EPSG_NAD83_CSRS_V6), xAxisTranslation: new Metre(-0), yAxisTranslation: new Metre(-0), zAxisTranslation: new Metre(-0), xAxisRotation: new ArcSecond(-0), yAxisRotation: new ArcSecond(-0), zAxisRotation: new ArcSecond(-0), scaleDifference: new PartsPerBillion(-0) ) ``` -------------------------------- ### Initialize CoordinateReferenceSystem from EPSG Code (Saba) Source: https://github.com/dvdoug/phpcoord/blob/master/docs/reflection/coordinatereferencesystem/geographic2d.txt Use CoordinateReferenceSystem::fromSRID with a specific EPSG code or constant to create a coordinate reference system. This example uses the Saba CRS. ```php CoordinateReferenceSystem::fromSRID(Geographic2D::EPSG_SABA) CoordinateReferenceSystem::fromSRID('urn:ogc:def:crs:EPSG::10636') ``` -------------------------------- ### Initialize Batavia CRS Source: https://github.com/dvdoug/phpcoord/blob/master/docs/reflection/coordinatereferencesystem/geographic2d.txt Examples for initializing the Batavia coordinate system. ```php Geographic2D::fromSRID(Geographic2D::EPSG_BATAVIA) Geographic2D::fromSRID('urn:ogc:def:crs:EPSG::4211') Geographic::fromSRID(Geographic2D::EPSG_BATAVIA) Geographic::fromSRID('urn:ogc:def:crs:EPSG::4211') CoordinateReferenceSystem::fromSRID(Geographic2D::EPSG_BATAVIA) CoordinateReferenceSystem::fromSRID('urn:ogc:def:crs:EPSG::4211') ``` -------------------------------- ### Initialize GR96(1996) Coordinate Systems Source: https://github.com/dvdoug/phpcoord/blob/master/docs/builtin_crs_geocentric.md Use these methods to initialize the 1996 realization of the GR96 system. ```php Geocentric::fromSRID(Geocentric::EPSG_GR96_1996) Geocentric::fromSRID('urn:ogc:def:crs:EPSG::10954') CoordinateReferenceSystem::fromSRID(Geocentric::EPSG_GR96_1996) CoordinateReferenceSystem::fromSRID('urn:ogc:def:crs:EPSG::10954') ``` -------------------------------- ### GeoJSON MultiLineString Geometry Source: https://github.com/dvdoug/phpcoord/blob/master/resources/papers/geojson-spec-draft.rst Example of a GeoJSON MultiLineString geometry object. ```json { "type": "MultiLineString", "coordinates": [ [ [100.0, 0.0], [101.0, 1.0] ], [ [102.0, 2.0], [103.0, 3.0] ] ] } ``` -------------------------------- ### Initialize NATRF2022 CRS Source: https://github.com/dvdoug/phpcoord/blob/master/docs/builtin_crs_geocentric.md Instantiate NATRF2022 reference systems. Note that this data is preliminary and subject to change. ```php Geocentric::fromSRID(Geocentric::EPSG_NATRF2022) Geocentric::fromSRID('urn:ogc:def:crs:EPSG::10966') CoordinateReferenceSystem::fromSRID(Geocentric::EPSG_NATRF2022) CoordinateReferenceSystem::fromSRID('urn:ogc:def:crs:EPSG::10966') ``` -------------------------------- ### GeoJSON MultiPoint Geometry Source: https://github.com/dvdoug/phpcoord/blob/master/resources/papers/geojson-spec-draft.rst Example of a GeoJSON MultiPoint geometry object. ```json { "type": "MultiPoint", "coordinates": [ [100.0, 0.0], [101.0, 1.0] ] } ``` -------------------------------- ### GeoJSON LineString Geometry Source: https://github.com/dvdoug/phpcoord/blob/master/resources/papers/geojson-spec-draft.rst Example of a GeoJSON LineString geometry object. ```json { "type": "LineString", "coordinates": [ [100.0, 0.0], [101.0, 1.0] ] } ``` -------------------------------- ### GeoJSON Point Geometry Source: https://github.com/dvdoug/phpcoord/blob/master/resources/papers/geojson-spec-draft.rst Example of a GeoJSON Point geometry object. ```json { "type": "Point", "coordinates": [100.0, 0.0] } ``` -------------------------------- ### Initialize CRS by SRID Source: https://github.com/dvdoug/phpcoord/blob/master/docs/reflection/coordinatereferencesystem/geographic3d.txt Demonstrates instantiation of CRS objects using either predefined class constants or OGC URN strings. ```php Geographic::fromSRID('urn:ogc:def:crs:EPSG::7682') CoordinateReferenceSystem::fromSRID(Geographic3D::EPSG_GSK_2011) CoordinateReferenceSystem::fromSRID('urn:ogc:def:crs:EPSG::7682') ``` ```php Geographic3D::fromSRID(Geographic3D::EPSG_GEORGIA_GEODETIC_DATUM) Geographic3D::fromSRID('urn:ogc:def:crs:EPSG::10830') Geographic::fromSRID(Geographic3D::EPSG_GEORGIA_GEODETIC_DATUM) Geographic::fromSRID('urn:ogc:def:crs:EPSG::10830') CoordinateReferenceSystem::fromSRID(Geographic3D::EPSG_GEORGIA_GEODETIC_DATUM) CoordinateReferenceSystem::fromSRID('urn:ogc:def:crs:EPSG::10830') ``` ```php Geographic3D::fromSRID(Geographic3D::EPSG_HTRS96) Geographic3D::fromSRID('urn:ogc:def:crs:EPSG::4889') Geographic::fromSRID(Geographic3D::EPSG_HTRS96) Geographic::fromSRID('urn:ogc:def:crs:EPSG::4889') CoordinateReferenceSystem::fromSRID(Geographic3D::EPSG_HTRS96) CoordinateReferenceSystem::fromSRID('urn:ogc:def:crs:EPSG::4889') ``` ```php Geographic3D::fromSRID(Geographic3D::EPSG_HARTEBEESTHOEK94) Geographic3D::fromSRID('urn:ogc:def:crs:EPSG::4941') Geographic::fromSRID(Geographic3D::EPSG_HARTEBEESTHOEK94) Geographic::fromSRID('urn:ogc:def:crs:EPSG::4941') CoordinateReferenceSystem::fromSRID(Geographic3D::EPSG_HARTEBEESTHOEK94) CoordinateReferenceSystem::fromSRID('urn:ogc:def:crs:EPSG::4941') ``` ```php Geographic3D::fromSRID(Geographic3D::EPSG_HONG_KONG_GEODETIC_CS) Geographic3D::fromSRID('urn:ogc:def:crs:EPSG::8426') Geographic::fromSRID(Geographic3D::EPSG_HONG_KONG_GEODETIC_CS) Geographic::fromSRID('urn:ogc:def:crs:EPSG::8426') CoordinateReferenceSystem::fromSRID(Geographic3D::EPSG_HONG_KONG_GEODETIC_CS) CoordinateReferenceSystem::fromSRID('urn:ogc:def:crs:EPSG::8426') ``` ```php Geographic3D::fromSRID(Geographic3D::EPSG_IG05_INTERMEDIATE_CRS) Geographic3D::fromSRID('urn:ogc:def:crs:EPSG::6982') Geographic::fromSRID(Geographic3D::EPSG_IG05_INTERMEDIATE_CRS) Geographic::fromSRID('urn:ogc:def:crs:EPSG::6982') CoordinateReferenceSystem::fromSRID(Geographic3D::EPSG_IG05_INTERMEDIATE_CRS) CoordinateReferenceSystem::fromSRID('urn:ogc:def:crs:EPSG::6982') ``` ```php Geographic3D::fromSRID(Geographic3D::EPSG_IG05_12_INTERMEDIATE_CRS) Geographic3D::fromSRID('urn:ogc:def:crs:EPSG::6989') Geographic::fromSRID(Geographic3D::EPSG_IG05_12_INTERMEDIATE_CRS) Geographic::fromSRID('urn:ogc:def:crs:EPSG::6989') CoordinateReferenceSystem::fromSRID(Geographic3D::EPSG_IG05_12_INTERMEDIATE_CRS) CoordinateReferenceSystem::fromSRID('urn:ogc:def:crs:EPSG::6989') ``` ```php Geographic3D::fromSRID(Geographic3D::EPSG_IGD05) Geographic3D::fromSRID('urn:ogc:def:crs:EPSG::7135') Geographic::fromSRID(Geographic3D::EPSG_IGD05) Geographic::fromSRID('urn:ogc:def:crs:EPSG::7135') CoordinateReferenceSystem::fromSRID(Geographic3D::EPSG_IGD05) CoordinateReferenceSystem::fromSRID('urn:ogc:def:crs:EPSG::7135') ``` ```php Geographic3D::fromSRID(Geographic3D::EPSG_IGD05_12) Geographic3D::fromSRID('urn:ogc:def:crs:EPSG::7138') Geographic::fromSRID(Geographic3D::EPSG_IGD05_12) Geographic::fromSRID('urn:ogc:def:crs:EPSG::7138') CoordinateReferenceSystem::fromSRID(Geographic3D::EPSG_IGD05_12) CoordinateReferenceSystem::fromSRID('urn:ogc:def:crs:EPSG::7138') ``` ```php Geographic3D::fromSRID(Geographic3D::EPSG_IGM95) Geographic3D::fromSRID('urn:ogc:def:crs:EPSG::4983') Geographic::fromSRID(Geographic3D::EPSG_IGM95) Geographic::fromSRID('urn:ogc:def:crs:EPSG::4983') CoordinateReferenceSystem::fromSRID(Geographic3D::EPSG_IGM95) CoordinateReferenceSystem::fromSRID('urn:ogc:def:crs:EPSG::4983') ``` ```php Geographic3D::fromSRID(Geographic3D::EPSG_IGRS) Geographic3D::fromSRID('urn:ogc:def:crs:EPSG::3888') Geographic::fromSRID(Geographic3D::EPSG_IGRS) ``` -------------------------------- ### Example: Register Custom Geographic2D CRS - PHPCoord Source: https://github.com/dvdoug/phpcoord/blob/master/docs/custom_coordinate_reference_systems.md This example demonstrates how to register a custom Geographic2D Coordinate Reference System (CRS) with a specific SRID, name, coordinate system, datum, and bounding area. Ensure all required classes like BoundingArea, Geographic2D, Ellipsoidal, and Datum are properly imported. ```php