Skip to content

Instantly share code, notes, and snippets.

@BishopGIS
Created October 29, 2020 09:29
Show Gist options
  • Save BishopGIS/1d27d1e6ed7f36053d01c2bfd92a2d74 to your computer and use it in GitHub Desktop.
Save BishopGIS/1d27d1e6ed7f36053d01c2bfd92a2d74 to your computer and use it in GitHub Desktop.
bishop@Bishop-MacBookPro tmp % /usr/bin/env python /Users/Bishop/.vscode/extensions/ms-python.python-2020.9.114305/pythonFiles/lib/python/debugpy/launcher 58870 -- /Volumes/Data/tmp/test_wfs.py
WFS: https://sandbox.nextgis.com/api/resource/6038/wfs?VERSION=1.0.0&SERVICE=WFS&REQUEST=GetCapabilities
HTTP: Fetch(https://sandbox.nextgis.com/api/resource/6038/wfs?VERSION=1.0.0&SERVICE=WFS&REQUEST=GetCapabilities)
HTTP: libcurl/7.71.1 OpenSSL/1.1.1c zlib/1.2.11
* Couldn't find host sandbox.nextgis.com in the .netrc file; using defaults
* Trying 5.9.138.126:443...
* Connected to sandbox.nextgis.com (5.9.138.126) port 443 (#0)
* ALPN, offering http/1.1
* successfully set certificate verify locations:
* CAfile: /Users/Bishop/Applications/NextGIS/Library/Frameworks/openssl.framework/Resources/ssl/certs/cert.pem
CApath: /etc/ssl/certs
* SSL connection using TLSv1.2 / ECDHE-RSA-CHACHA20-POLY1305
* ALPN, server accepted to use http/1.1
* Server certificate:
* subject: CN=sandbox.nextgis.com
* start date: Oct 20 06:35:41 2020 GMT
* expire date: Jan 18 06:35:41 2021 GMT
* subjectAltName: host "sandbox.nextgis.com" matched cert's "sandbox.nextgis.com"
* issuer: C=US; O=Let's Encrypt; CN=Let's Encrypt Authority X3
* SSL certificate verify ok.
> GET /api/resource/6038/wfs?VERSION=1.0.0&SERVICE=WFS&REQUEST=GetCapabilities HTTP/1.1
Host: sandbox.nextgis.com
Accept: */*
Accept-Encoding: gzip
* Mark bundle as not supporting multiuse
< HTTP/1.1 200 OK
< Server: nginx
< Date: Thu, 29 Oct 2020 09:27:12 GMT
< Content-Type: text/xml; charset=UTF-8
< Content-Length: 2442
< Connection: keep-alive
< Strict-Transport-Security: max-age=31536000
<
* Connection #0 to host sandbox.nextgis.com left intact
GDAL: GDALOpen(WFS:https://sandbox.nextgis.com/api/resource/6038/wfs?VERSION=1.0.0, this=0x7ffe8f6958f0) succeeds as WFS.
HTTP: Fetch(https://sandbox.nextgis.com/api/resource/6038/wfs?VERSION=1.0.0&SERVICE=WFS&REQUEST=DescribeFeatureType&TYPENAME=madcity,parks,places_to_eat)
* Couldn't find host sandbox.nextgis.com in the .netrc file; using defaults
* Trying 5.9.138.126:443...
* Connected to sandbox.nextgis.com (5.9.138.126) port 443 (#0)
* ALPN, offering http/1.1
* successfully set certificate verify locations:
* CAfile: /Users/Bishop/Applications/NextGIS/Library/Frameworks/openssl.framework/Resources/ssl/certs/cert.pem
CApath: /etc/ssl/certs
* SSL connection using TLSv1.2 / ECDHE-RSA-CHACHA20-POLY1305
* ALPN, server accepted to use http/1.1
* Server certificate:
* subject: CN=sandbox.nextgis.com
* start date: Oct 20 06:35:41 2020 GMT
* expire date: Jan 18 06:35:41 2021 GMT
* subjectAltName: host "sandbox.nextgis.com" matched cert's "sandbox.nextgis.com"
* issuer: C=US; O=Let's Encrypt; CN=Let's Encrypt Authority X3
* SSL certificate verify ok.
> GET /api/resource/6038/wfs?VERSION=1.0.0&SERVICE=WFS&REQUEST=DescribeFeatureType&TYPENAME=madcity,parks,places_to_eat HTTP/1.1
Host: sandbox.nextgis.com
Accept: */*
Accept-Encoding: gzip
* Mark bundle as not supporting multiuse
< HTTP/1.1 200 OK
< Server: nginx
< Date: Thu, 29 Oct 2020 09:27:12 GMT
< Content-Type: text/xml; charset=UTF-8
< Content-Length: 715
< Connection: keep-alive
< Strict-Transport-Security: max-age=31536000
<
* Connection #0 to host sandbox.nextgis.com left intact
WFS: Turn off loading of multiple layer definitions at a single time
WFS: https://sandbox.nextgis.com/api/resource/6038/wfs?VERSION=1.0.0&SERVICE=WFS&REQUEST=DescribeFeatureType&TYPENAME=madcity
HTTP: Fetch(https://sandbox.nextgis.com/api/resource/6038/wfs?VERSION=1.0.0&SERVICE=WFS&REQUEST=DescribeFeatureType&TYPENAME=madcity)
* Couldn't find host sandbox.nextgis.com in the .netrc file; using defaults
* Trying 5.9.138.126:443...
* Connected to sandbox.nextgis.com (5.9.138.126) port 443 (#0)
* ALPN, offering http/1.1
* successfully set certificate verify locations:
* CAfile: /Users/Bishop/Applications/NextGIS/Library/Frameworks/openssl.framework/Resources/ssl/certs/cert.pem
CApath: /etc/ssl/certs
* SSL connection using TLSv1.2 / ECDHE-RSA-CHACHA20-POLY1305
* ALPN, server accepted to use http/1.1
* Server certificate:
* subject: CN=sandbox.nextgis.com
* start date: Oct 20 06:35:41 2020 GMT
* expire date: Jan 18 06:35:41 2021 GMT
* subjectAltName: host "sandbox.nextgis.com" matched cert's "sandbox.nextgis.com"
* issuer: C=US; O=Let's Encrypt; CN=Let's Encrypt Authority X3
* SSL certificate verify ok.
> GET /api/resource/6038/wfs?VERSION=1.0.0&SERVICE=WFS&REQUEST=DescribeFeatureType&TYPENAME=madcity HTTP/1.1
Host: sandbox.nextgis.com
Accept: */*
Accept-Encoding: gzip
* Mark bundle as not supporting multiuse
< HTTP/1.1 200 OK
< Server: nginx
< Date: Thu, 29 Oct 2020 09:27:12 GMT
< Content-Type: text/xml; charset=UTF-8
< Content-Length: 1284
< Connection: keep-alive
< Strict-Transport-Security: max-age=31536000
<
* Connection #0 to host sandbox.nextgis.com left intact
WFS: https://sandbox.nextgis.com/api/resource/6038/wfs?VERSION=1.0.0&SERVICE=WFS&REQUEST=GetFeature&TYPENAME=madcity
VSICURL: Start download for https://sandbox.nextgis.com/api/resource/6038/wfs?VERSION=1.0.0&SERVICE=WFS&REQUEST=GetFeature&TYPENAME=madcity
* Couldn't find host sandbox.nextgis.com in the .netrc file; using defaults
* Trying 5.9.138.126:443...
* Connected to sandbox.nextgis.com (5.9.138.126) port 443 (#0)
* ALPN, offering http/1.1
* successfully set certificate verify locations:
* CAfile: /Users/Bishop/Applications/NextGIS/Library/Frameworks/openssl.framework/Resources/ssl/certs/cert.pem
CApath: /etc/ssl/certs
* SSL connection using TLSv1.2 / ECDHE-RSA-CHACHA20-POLY1305
* ALPN, server accepted to use http/1.1
* Server certificate:
* subject: CN=sandbox.nextgis.com
* start date: Oct 20 06:35:41 2020 GMT
* expire date: Jan 18 06:35:41 2021 GMT
* subjectAltName: host "sandbox.nextgis.com" matched cert's "sandbox.nextgis.com"
* issuer: C=US; O=Let's Encrypt; CN=Let's Encrypt Authority X3
* SSL certificate verify ok.
> GET /api/resource/6038/wfs?VERSION=1.0.0&SERVICE=WFS&REQUEST=GetFeature&TYPENAME=madcity HTTP/1.1
Host: sandbox.nextgis.com
Accept: */*
Accept-Encoding: gzip
* Mark bundle as not supporting multiuse
< HTTP/1.1 200 OK
< Server: nginx
< Date: Thu, 29 Oct 2020 09:27:13 GMT
< Content-Type: text/xml; charset=UTF-8
< Content-Length: 129057
< Connection: keep-alive
< Strict-Transport-Security: max-age=31536000
<
GML: Using /vsimem/tempwfs_0x7ffe941b8240/file.xsd
GDAL: GDALOpen(/vsicurl_streaming/https://sandbox.nextgis.com/api/resource/6038/wfs?VERSION=1.0.0&SERVICE=WFS&REQUEST=GetFeature&TYPENAME=madcity, this=0x7ffe8f6aec80) succeeds as GML.
GML: ResetReading()
GML: ResetReading()
* Connection #0 to host sandbox.nextgis.com left intact
WFS: Post : <?xml version="1.0"?>
<wfs:Transaction xmlns:wfs="http://www.opengis.net/wfs"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
service="WFS" version="1.0.0"
xmlns:gml="http://www.opengis.net/gml"
xmlns:ogc="http://www.opengis.net/ogc"
xsi:schemaLocation="http://www.opengis.net/wfs http://schemas.opengis.net/wfs/1.0.0/wfs.xsd http://www.opengis.net/wfs https://sandbox.nextgis.com/api/resource/6038/wfs?VERSION=1.0.0&amp;SERVICE=WFS&amp;REQUEST=DescribeFeatureType&amp;TYPENAME=madcity">
<wfs:Update typeName="feature:madcity" xmlns:feature="http://www.opengis.net/wfs">
<wfs:Property>
<wfs:Name>geom</wfs:Name>
<wfs:Value><gml:MultiPolygon srsName="EPSG:3857"><gml:polygonMember><gml:Polygon><gml:outerBoundaryIs><gml:LinearRing><gml:coordinates>0,0 111319.490793274,111325.142866385 0.0,111325.142866385 0,0</gml:coordinates></gml:LinearRing></gml:outerBoundaryIs></gml:Polygon></gml:polygonMember><gml:polygonMember><gml:Polygon><gml:outerBoundaryIs><gml:LinearRing><gml:coordinates>0,0 0.0,1118889.97485796 1113194.90793274,1118889.97485796 1113194.90793274,0.0</gml:coordinates></gml:LinearRing></gml:outerBoundaryIs><gml:innerBoundaryIs><gml:LinearRing><gml:coordinates>111319.490793274,111325.142866385 222638.981586547,111325.142866385 222638.981586547,222684.208505543 111319.490793274,222684.208505543</gml:coordinates></gml:LinearRing></gml:innerBoundaryIs></gml:Polygon></gml:polygonMember></gml:MultiPolygon></wfs:Value>
</wfs:Property>
<wfs:Property>
<wfs:Name>name</wfs:Name>
<wfs:Value>Madison</wfs:Value>
</wfs:Property>
<wfs:Property>
<wfs:Name>admin_leve</wfs:Name>
<wfs:Value>8</wfs:Value>
</wfs:Property>
<wfs:Property>
<wfs:Name>is_in_stat</wfs:Name>
<wfs:Value>Wisconsin</wfs:Value>
</wfs:Property>
<wfs:Property>
<wfs:Name>is_in_st_1</wfs:Name>
<wfs:Value>WI</wfs:Value>
</wfs:Property>
<wfs:Property>
<wfs:Name>place</wfs:Name>
<wfs:Value>city</wfs:Value>
</wfs:Property>
<wfs:Property>
<wfs:Name>test</wfs:Name>
<wfs:Value>4</wfs:Value>
</wfs:Property>
<wfs:Property>
<wfs:Name>boundary</wfs:Name>
<wfs:Value>administrative</wfs:Value>
</wfs:Property>
<wfs:Property>
<wfs:Name>population</wfs:Name>
<wfs:Value>248951</wfs:Value>
</wfs:Property>
<wfs:Property>
<wfs:Name>type</wfs:Name>
<wfs:Value>boundary</wfs:Value>
</wfs:Property>
<wfs:Property>
<wfs:Name>is_in_co_1</wfs:Name>
<wfs:Value>US</wfs:Value>
</wfs:Property>
<wfs:Property>
<wfs:Name>is_in_coun</wfs:Name>
<wfs:Value>USA</wfs:Value>
</wfs:Property>
<wfs:Property>
<wfs:Name>is_in</wfs:Name>
<wfs:Value>USA, Wisconsin</wfs:Value>
</wfs:Property>
<ogc:Filter>
<ogc:FeatureId fid="1"/>
</ogc:Filter>
</wfs:Update>
</wfs:Transaction>
HTTP: Fetch(https://sandbox.nextgis.com/api/resource/6038/wfs)
HTTP: These POSTFIELDS were sent:<?xml version="1.0"?>
<wfs:Transaction xmlns:wfs="http://www.opengis.net/wfs"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
service="WFS" version="1.0.0"
xmlns:gml="http://www.opengis.net/gml"
xmlns:ogc="http://www.opengis.net/ogc"
xsi:schemaLocation="http://www.opengis.net/wfs http://schemas.opengis.net/wfs/1.0.0/wfs.xsd http://www.opengis.net/wfs https://sandbox.nextgis.com/api/resource/6038/wfs?VERSION=1.0.0&amp;SERVICE=WFS&amp;REQUEST=DescribeFeatureType&amp;TYPENAME=madcity">
<wfs:Update typeName="feature:madcity" xmlns:feature="http://www.opengis.net/wfs">
<wfs:Property>
<wfs:Name>geom</wfs:Name>
<wfs:Value><gml:MultiPolygon srsName="EPSG:3857"><gml:polygonMember><gml:Polygon><gml:outerBoundaryIs><gml:LinearRing><gml:coordinates>0,0 111319.490793274,111325.142866385 0.0,111325.142866385 0,0</gml:coordinates></gml:LinearRing></gml:outerBoundaryIs></gml:Polygon></gml:polygonMember><gml:polygonMember><gml:Polygon><gml:outerBoundaryIs><gml:LinearRing><gml:coordinates>0,0 0.0,1118889.97485796 1113194.90793274,1118889.97485796 1113194.90793274,0.0</gml:coordinates></gml:LinearRing></gml:outerBoundaryIs><gml:innerBoundaryIs><gml:LinearRing><gml:coordinates>111319.490793274,111325.142866385 222638.981586547,111325.142866385 222638.981586547,222684.208505543 111319.490793274,222684.208505543</gml:coordinates></gml:LinearRing></gml:innerBoundaryIs></gml:Polygon></gml:polygonMember></gml:MultiPolygon></wfs:Value>
</wfs:Property>
<wfs:Property>
<wfs:Name>name</wfs:Name>
<wfs:Value>Madison</wfs:Value>
</wfs:Property>
<wfs:Property>
<wfs:Name>admin_leve</wfs:Name>
<wfs:Value>8</wfs:Value>
</wfs:Property>
<wfs:Property>
<wfs:Name>is_in_stat</wfs:Name>
<wfs:Value>Wisconsin</wfs:Value>
</wfs:Property>
<wfs:Property>
<wfs:Name>is_in_st_1</wfs:Name>
<wfs:Value>WI</wfs:Value>
</wfs:Property>
<wfs:Property>
<wfs:Name>place</wfs:Name>
<wfs:Value>city</wfs:Value>
</wfs:Property>
<wfs:Property>
<wfs:Name>test</wfs:Name>
<wfs:Value>4</wfs:Value>
</wfs:Property>
<wfs:Property>
<wfs:Name>boundary</wfs:Name>
<wfs:Value>administrative</wfs:Value>
</wfs:Property>
<wfs:Property>
<wfs:Name>population</wfs:Name>
<wfs:Value>248951</wfs:Value>
</wfs:Property>
<wfs:Property>
<wfs:Name>type</wfs:Name>
<wfs:Value>boundary</wfs:Value>
</wfs:Property>
<wfs:Property>
<wfs:Name>is_in_co_1</wfs:Name>
<wfs:Value>US</wfs:Value>
</wfs:Property>
<wfs:Property>
<wfs:Name>is_in_coun</wfs:Name>
<wfs:Value>USA</wfs:Value>
</wfs:Property>
<wfs:Property>
<wfs:Name>is_in</wfs:Name>
<wfs:Value>USA, Wisconsin</wfs:Value>
</wfs:Property>
<ogc:Filter>
<ogc:FeatureId fid="1"/>
</ogc:Filter>
</wfs:Update>
</wfs:Transaction>
HTTP: These HTTP headers were set: Content-Type: application/xml; charset=UTF-8
* Couldn't find host sandbox.nextgis.com in the .netrc file; using defaults
* Trying 5.9.138.126:443...
* Connected to sandbox.nextgis.com (5.9.138.126) port 443 (#0)
* ALPN, offering http/1.1
* successfully set certificate verify locations:
* CAfile: /Users/Bishop/Applications/NextGIS/Library/Frameworks/openssl.framework/Resources/ssl/certs/cert.pem
CApath: /etc/ssl/certs
* SSL connection using TLSv1.2 / ECDHE-RSA-CHACHA20-POLY1305
* ALPN, server accepted to use http/1.1
* Server certificate:
* subject: CN=sandbox.nextgis.com
* start date: Oct 20 06:35:41 2020 GMT
* expire date: Jan 18 06:35:41 2021 GMT
* subjectAltName: host "sandbox.nextgis.com" matched cert's "sandbox.nextgis.com"
* issuer: C=US; O=Let's Encrypt; CN=Let's Encrypt Authority X3
* SSL certificate verify ok.
> POST /api/resource/6038/wfs HTTP/1.1
Host: sandbox.nextgis.com
Accept: */*
Accept-Encoding: gzip
Content-Type: application/xml; charset=UTF-8
Content-Length: 2989
* upload completely sent off: 2989 out of 2989 bytes
* Mark bundle as not supporting multiuse
< HTTP/1.1 500 Internal Server Error
< Server: nginx
< Date: Thu, 29 Oct 2020 09:27:13 GMT
< Content-Type: application/json
< Content-Length: 290
< Connection: keep-alive
< Strict-Transport-Security: max-age=31536000
<
* Connection #0 to host sandbox.nextgis.com left intact
ERROR 1: HTTP error code : 500
ERROR 1: Error returned by server : HTTP error code : 500 (0)
6
VSICURL: Stop download for https://sandbox.nextgis.com/api/resource/6038/wfs?VERSION=1.0.0&SERVICE=WFS&REQUEST=GetFeature&TYPENAME=madcity
GDAL: GDALClose(/vsicurl_streaming/https://sandbox.nextgis.com/api/resource/6038/wfs?VERSION=1.0.0&SERVICE=WFS&REQUEST=GetFeature&TYPENAME=madcity, this=0x7ffe8f6aec80)
GDAL: GDALClose(WFS:https://sandbox.nextgis.com/api/resource/6038/wfs?VERSION=1.0.0, this=0x7ffe8f6958f0)
bishop@Bishop-MacBookPro tmp %
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment