koopjs / koop-provider-csv

Koop provider for CSV
MIT License
5 stars 3 forks source link

WARNING: source data for /koop-provider-csv/my-data/FeatureServer/ contains invalid GeoJSON. #10

Closed Tonnes85 closed 3 years ago

Tonnes85 commented 4 years ago

Dear all,

Currently im doing some tests with KoopJS. What i want to do is; Read csv files from the web, and look them into Arcgis Pro. So koopJS will provide me this.

I did the installation as shown on github. But now im getting an error ; WARNING: source data for /koop-provider-csv/my-data/FeatureServer/ contains invalid GeoJSON.

This is my default.json

{
  "koop-provider-csv": {
    "sources": {
      "my-data": {
        "url": "http://sensorkaart.nl/koopjs/points.csv",
        "metadata": {
          "name": "My Data",
          "description": "data description",
          "idField": "id"
        },
        "geometryColumns": {
          "latitude": "latitude",
          "longitude": "longitude"
        }
      },
      "wouter": {
        "url": "https://api.nightly.triply.cc/queries/wouter/bi/run.csv?gemeente=Apeldoorn",
        "metadata": {
          "name": "Apeldoorn",
          "description": "data description",
          "idField": "infections"
        },
        "geometryColumns": {
          "latitude": "x",
          "longitude": "y"
        }

      }
    }
  }
}

What's wrong ? :-(

rgwozdz commented 4 years ago

It's not an error, just a warning. Are your X, Y values in coordinate system WGS84? GeoJSON is only technically valid if it uses WGS84.

haoliangyu commented 3 years ago

The original CSV parser has a problem to parse negative numbers. So it may produce coordinates in string.

Not sure if this is the cause of the issue, but I have a fix at #12