0

How do I connect my WFS service to CARTO - dashboard/datasets? http://services.cuzk.cz/wfs/inspire-cp-wfs.asp?

1

I'm afraid you cannot connect WFS to CARTO directly, but you can download all the data to your computer using some tool, for example OGR/GDAL:

ogr2ogr -f GPKG inspire-cp-wfs.gpkg --config OGR_WFS_PAGING_ALLOWED ON "WFS:http://services.cuzk.cz/wfs/inspire-cp-wfs.asp?version=2.0.0&"

Then upload the gpkg to your CARTO account.

Warnings: Complete dataset is not small, so the download may take long time (it seems to have gigabytes of data), and your CARTO account may require upgrade to fit it all in terms of both data size and performance.

ps. It seems that same source http://services.cuzk.cz/ has some data also in SHP (Shapefile) format. This can be loaded directly to CARTO, just find the URL of data file ZIP and "connect" to this dataset. You may hit some limits there also - eg. one zip should not have more than 10 layers.

You may try to construct custom WFS GetFeature query using outputFormat=Shapefile parameter, and connect data as Shapefile URL directly to CARTO. But not all WFS servers output Shapefile, for instance yours seems to provide only GML, so this would not work there. Also your server does not output all data at once and many WFS clients, including CARTO do not do paging, so you may get partial results. This is why config parameter is used in the ogr2ogr command above.

  • If it answers your question, then please mark this answer as "resolved". However, make sure to add some filter to the ogr2ogr command: for example bounding box -spat xmin ymin xmax ymax or SQL -sql <sql statement>. Otherwise it will try to get whole national dataset, which seems to be at least hundreds of gigabytes in size (which cannot be uploaded to Carto for sure) and the download will take several days. – JaakL Oct 18 '17 at 6:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.