Use of ImportWFS with spatialite.exe bis...

38 views
Skip to first unread message

mlcvista

unread,
Apr 20, 2017, 9:28:21 AM4/20/17
to SpatiaLite Users
Hello !

I’m using spatialite.exe 4.3.0a.

 

I‘ve wrote this sql5.sql file:

SELECT ImportWFS("http://webgis.regione.sardegna.it/geoserver/ows?service=WFS&request=GetCapabilities", "dbu:TUT_ZONERAMSAR", "RAMSAR","null", "no",15,"yes" );

 

I run it like this with the windows cmd black window:

> set SPATIALITE_SECURITY=relaxed

> spatialite.exe db.sqlite < sql5.sql

This is what I do, and the result:

 

Microsoft Windows [version 10.0.14393]

(c) 2016 Microsoft Corporation. Tous droits réservés.

C:\>cd sp

C:\sp>set SPATIALITE_SECURITY=relaxed

C:\sp>spatialite.exe db.sqlite < sql5.sql

SpatiaLite version ..: 4.3.0a   Supported Extensions:

        - 'VirtualShape'        [direct Shapefile access]

        - 'VirtualDbf'          [direct DBF access]

        - 'VirtualXL'           [direct XLS access]

        - 'VirtualText'         [direct CSV/TXT access]

        - 'VirtualNetwork'      [Dijkstra shortest path]

        - 'RTree'               [Spatial Index - R*Tree]

        - 'MbrCache'            [Spatial Index - MBR cache]

        - 'VirtualSpatialIndex' [R*Tree metahandler]

        - 'VirtualElementary'   [ElemGeoms metahandler]

        - 'VirtualXPath'        [XML Path Language - XPath]

        - 'VirtualFDO'          [FDO-OGR interoperability]

        - 'VirtualGPKG' [OGC GeoPackage interoperability]

        - 'VirtualBBox'         [BoundingBox tables]

        - 'SpatiaLite'          [Spatial SQL - OGC]

PROJ.4 version ......: Rel. 4.9.1, 04 March 2015

GEOS version ........: 3.5.0-CAPI-1.9.0 r4084

LWGEOM version ......: 2.1.7

TARGET CPU ..........: mingw32

C:\sp>

 

If I open my db.sqlite I don’t found any RAMSAR table…

 

Same result if  I use this sql :

SELECT ImportWFS("http://webgis.regione.sardegna.it/geoserver/ows?service=WFS&request=GetCapabilities", "dbu:TUT_ZONERAMSAR", "RAMSAR");


What’s wrong with my actions?

 

Big thank you in advance for your help!

 

With best regards,

Michel

mj10777

unread,
Apr 20, 2017, 9:58:38 AM4/20/17
to SpatiaLite Users
When you are working with new tools, you must learn how to use them.

I assume you have looked at the command syntax at

Look for ImportWFS:
Look at the explanation of filename_or_url

...Alternatively an URL corresponding to a WFS service

Look at the url you are using


Is that a 'request' to retrieve an area from a WFS service?
- no it is not

What type of request is 'GetCapabilities' ?
- google 'GetCapabilities italian'

Will show you as a second entry:


There you can see that 'GetCapabilities' is use to tell what the WFS server can offer you.

It also tells you that 'GetFeature' is the 'request' to download data.
Further down (.loadwfs) is a sample url to be used with 'ImportWFS'

Here is a sample script I used once:

-- export SPATIALITE_SECURITY=relaxed
-- rm import.wfs_berlin.db ; spatialite import.wfs_berlin.db < import.wfs_berlin.sql
--  wfs_berlin_build_385_5820.sql
-- export SPATIALITE_SECURITY=relaxed
-- rm wfs_berlin_build.db ; spatialite wfs_berlin_build.db < wfs_berlin_build.sql
-- - the WFS server in Berlin (unknown model, but I strongly suspect it's ESRI)
-- only works when using WFS 2.x because it's completely unable to support WFS 1.x paging.

SELECT ImportWFS
( -- first time 16400 rows; second time 1700 rows
 "fis:re_alkis_flurstuecke",
 "berlin_389_5817_100",
 "id_flur",
 0,100,1
);

Mark

mlcvista

unread,
Apr 20, 2017, 10:31:03 AM4/20/17
to SpatiaLite Users

Hello Mark !

Big thank you for your help.

I've understand the document with your help.

I've succeded to run the sample given with this sql :

Excuse me for my basics questions... And I Thank you again, for your help, it's nice.

With best Regards,
Michel
Reply all
Reply to author
Forward
0 new messages