geo-engine / geoengine Goto Github PK
View Code? Open in Web Editor NEWWorkspace for the geo engine crates
Home Page: https://www.geoengine.de/en/
License: Apache License 2.0
Workspace for the geo engine crates
Home Page: https://www.geoengine.de/en/
License: Apache License 2.0
Consider the following csv file: lonlat_empty_field.csv
Longitude,Latitude,Name
1.1,2.2,foo
1.1,2.2,
This file will be loaded using a standard OgrSource.
The FeatureDataRef
returned by the data
-method identifies the string in the scond row as NULL. This can be seen in the following test:
let column: FeatureDataRef = result.data("Name").unwrap();
assert_eq!(column.nulls(), vec![false, true]);
assert_eq!(column.get_unchecked(0), FeatureDataValue::NullableText(Some("foo".to_string())));
assert_eq!(column.get_unchecked(1), FeatureDataValue::NullableText(None));
But at the same time the MultiPointCollection
itself stores an empty string:
let pc = MultiPointCollection::from_data(
MultiPoint::many(vec![vec![(1.1, 2.2)], vec![(1.1, 2.2)]]).unwrap(),
vec![Default::default(); 2],
{
let mut map = HashMap::new();
map.insert("Name".into(), FeatureData::NullableText(vec![Some("foo".to_owned()), Some("".to_owned())]));
map
},
)
.unwrap();
assert_eq!(result, pc);
This discrepancy could lead to the problem that the Point in Polygon-Operator throws an error.
The GDAL OpenOption "EMPTY_STRING_AS_NULL=YES" can be set (which is done in #486). In that case the MultiPointCollection will store the second string cell as NULL and the Operator functions properly:
let pc = MultiPointCollection::from_data(
MultiPoint::many(vec![vec![(1.1, 2.2)], vec![(1.1, 2.2)]]).unwrap(),
vec![Default::default(); 2],
{
let mut map = HashMap::new();
map.insert("Name".into(), FeatureData::NullableText(vec![Some("foo".to_owned()), None]));
map
},
)
.unwrap();
assert_eq!(result, pc);
I do not know the exact reason why the data inside the FeatureDataRef
and the internal data in MultiPointCollection
happens to be different yet.
docker build --file=dev.Dockerfile --tag=geoengine:0.0.1 .
Compiling actix-multipart v0.4.0-beta.9
Compiling actix-web-httpauth v0.6.0-beta.4
error: failed to run custom build command for `geoengine-services v0.1.0 (/app/services)`
Caused by:
process didn't exit successfully: `/app/target/release/build/geoengine-services-91e999261e8ed61b/build-script-build` (exit status: 1)
--- stderr
Error: could not find repository from '/app/services'; class=Repository (6); code=NotFound (-3)
warning: build failed, waiting for other jobs to finish...
error: build failed
The command
After biulding the backend I started it with cargo run
:
cargo run
Finished dev [unoptimized + debuginfo] target(s) in 0.66s
Running `target/debug/main`
[flexi_logger][ERRCODE::Time] flexi_logger has to work with UTC rather than with local time, caused by IndeterminateOffset
See https://docs.rs/flexi_logger/latest/flexi_logger/error_info/index.html#time
[2021-12-15 07:53:20.927504 +00:00] INFO [geoengine_services::server] Starting server… http://localhost:3030/
[2021-12-15 07:53:20.929092 +00:00] INFO [geoengine_services::server] Using in memory backend
[2021-12-15 07:53:20.974746 +00:00] WARN [geoengine_services::datasets::add_from_directory] Skipped adding provider from directory entry: DirEntry("./test_data/provider_defs/gfbio.json") error: SerdeJson: unknown variant `GfbioDataProviderDefinition`, expected `MockExternalDataProviderDefinition` at line 2 column 39
[2021-12-15 07:53:20.979882 +00:00] INFO [actix_server::builder] Starting 8 workers
[2021-12-15 07:53:20.980225 +00:00] INFO [actix_server::server] Tokio runtime found; starting in existing Tokio runtime
However the frontend cannot attach to it:
npm run serve:geoengine:local
> [email protected] serve:geoengine:local
> ng serve --configuration development geoengine-app --proxy-config proxy-local.conf.json
Node.js version v17.2.0 detected.
Odd numbered Node.js versions will not enter LTS status and should not be used for production. For more information, please see https://nodejs.org/en/about/releases/.
⠋ Generating browser application bundles (phase: setup)...[HPM] Proxy created: /api -> http://localhost:3030/
[HPM] Proxy rewrite rule created: "^/api" ~> ""
[HPM] Subscribed to http-proxy events: [ 'error', 'close' ]
[HPM] Proxy created: /mapcache -> http://sng107.sng.uni-frankfurt.de/mapcache/
[HPM] Subscribed to http-proxy events: [ 'error', 'close' ]
✔ Browser application bundle generation complete.
Initial Chunk Files | Names | Size
vendor.js | vendor | 15.59 MB
main.js | main | 1.28 MB
polyfills.js | polyfills | 128.64 kB
styles.css | styles | 104.68 kB
runtime.js | runtime | 6.82 kB
| Initial Total | 17.11 MB
Build at: 2021-12-15T07:57:53.105Z - Hash: 15809ea91ba4b70668bb - Time: 15892ms
** Angular Live Development Server is listening on localhost:4200, open your browser on http://localhost:4200/ **
✔ Compiled successfully.
[HPM] Rewriting path from "/api/session" to "/session"
[HPM] GET /api/session ~> http://localhost:3030/
[HPM] Error occurred while trying to proxy request /session from localhost:4200 to http://localhost:3030/ (ECONNREFUSED) (https://nodejs.org/api/errors.html#errors_common_system_errors)
[HPM] Rewriting path from "/api/anonymous" to "/anonymous"
[HPM] POST /api/anonymous ~> http://localhost:3030/
On the root URL it responds with
{"error":"NotFound","message":"Not Found"}%
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.