jiayuasu opened a new pull request, #2658: URL: https://github.com/apache/sedona/pull/2658
## Did you read the Contributor Guide? - Yes, I have read the [Contributor Rules](https://sedona.apache.org/latest/community/rule/) and [Contributor Development Guide](https://sedona.apache.org/latest/community/develop/) ## Is this PR related to a ticket? - Yes, and the PR name follows the format `[GH-XXX] my subject`. Closes #2657 ## What changes were proposed in this PR? Upgrade proj4sedona from 0.0.3 to 0.0.4 and adopt the new `UrlCRSProvider` API, allowing users to resolve CRS definitions from a remote HTTP server (e.g., a GitHub repo or S3 bucket) before falling back to built-in definitions. ### Changes **Dependency upgrade** - `pom.xml`: bump `proj4sedona.version` from `0.0.3` to `0.0.4` **New Spark configuration keys** (`SedonaConf.java`) | Key | Default | Description | |-----|---------|-------------| | `spark.sedona.crs.url.base` | `""` (disabled) | Base URL of the CRS definition server | | `spark.sedona.crs.url.pathTemplate` | `/{authority}/{code}.json` | URL path template with `{authority}| `spark.sedona.crs.url.pathTemplate`k.s| `spark.sedona.crs.url.pathTemplate` | `/{authority}/{code}.json` | URL path template with `{authority}| `spark.sedona.crs.url.pathTemplate`k.s| `spark.sedona.crs.url.pathTemplatethTemplate, format)`: registers a `UrlC| `spark.sedona.crs.url.pathTemplate` | `/{authority}/{code}.json` | URL patin | `spark.sedona.crs.url.pathTemplatecked lo| `spark.sedona.crs.url.pathTemplate` | `/{authority}/{code}.json` | URL path template with `{authority}| `spark.sedona.crs.url.pathTemplate`k.s| `spark.sedona.crs.url.pathTemplate` | `/{authority}/{code}.json` | URL path tempFunctions.scala`) - `ST_Transform` captures the 3 new config values on the driver via `SedonaConf` and s- `ST_Transform` captures the 3 new config values oins- `ST_Transform` captures ths du- `ST_Transform` capturempanion - `ST_Transform` captures the 3 new config values on the driver via `SedonaConf` ansformat- `ST_Transform` captures the 3 new config values on the driver via `SedonaConf` and s- `ST_Transform` captures the 3 new config values oins- `ST_Transform` captures ths du- `ST_Transform` capturempanion - `ST_Transform` captures the 3 new config values on the driver via `SedonaConf` ansformat- `ST_Transform` captures the 3 new config values on the driver via `SedonaConf` and s- `ST_Transform` captures the 3 new config values oins- `ST_Transform` captures ths du- `ST_Transform` capturempanion - `ST_Transform` captures the 3 new config values on the driver via `SedonaConf` ansformat- `ST_Transform` captures the 3 new config values on the driver via `SedonaConf` and s- `ST_Transform` captures t he 3 new config values oinAndCaseInsensitive`: null/empty/unknown/uppercase default to PROJJSON - `testTransformWithLocalUrlCrsProvider`: local HTTP server serves fake EPSG:990001 (Mercator with offset), verifies URL provider resolves custom code - `testRegisterUrlCrsProviderConcurrentThreadSafety`: 16 threads race into registration via `CyclicBarrier`, asserts exactly 1 provider registered **Integration tests** (`CRSTransformProj4Test.scala` — 36 tests, 4 new) - `should still transform correctly when URL provider is not configured` - `should fall back to built-in when URL provider returns nothing` - `should register URL CRS provider when config is set` - `should transform using local HTTP URL CRS provider with custom CRS` **Config tests** (`SedonaConfTest.java` — 9 tests, 6 new) - Default values, custom overrides, empty string handling for all 3 config keys All tests pass locally: ``` mvn test -pl common -Dtest=FunctionsProj4Test # 42/42 passed mvn test -pl spark/common -Dlog4j.version=2.19.0 -Dtest=SedonaConfTestmvn test -pl spark/common -Dlog4j.version=2.19.0 -Dtest=SedonaConn=2.19.0 -Dsuites="org.apache.sedona.sql.CRSTransformProj4Test" # 36/36 passed ``` ## Did this PR include necessary documentation updates? - Yes, I have updated the documentation. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
