Thanks Ben, How is life treating the AusVet these days? Been quite a few versions under the bridge since we discussed R and Postgres stuff. 2009 was it??
That kicked some quiescent brain cells into gear. I just tried it from home, where it also works fine, if a bit sluggish, which seems to be how ESRI supports open standards. So it may be some network settings from NIWA causing the failure. At least I can kick that problem elsewhere!!! Much appreciated. Brent Wood Principal Technician, Fisheries NIWA DDI: +64 (4) 3860529 ________________________________ From: Ben Madin <b...@ausvet.com.au> Sent: Tuesday, October 5, 2021 20:57 To: Brent Wood <brent.w...@niwa.co.nz> Cc: pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org> Subject: Re: help implementing OGR Postgres foreign data wrapper Hi Brent, not sure why, but it is working for me using ogrinfo: ~ $ ogrinfo https://dservices3.arcgis.com/fp1tibNcN9mbExhG/arcgis/services/BOMEC_15_Class_WFS/WFSServer\?SERVICE\=WFS\&REQUEST\=GetCapabilities<https://aus01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdservices3.arcgis.com%2Ffp1tibNcN9mbExhG%2Farcgis%2Fservices%2FBOMEC_15_Class_WFS%2FWFSServer%2F%3FSERVICE%255C%3DWFS%255C%26REQUEST%255C%3DGetCapabilities&data=04%7C01%7CBrent.Wood%40niwa.co.nz%7C4ef57eaa3412469bbb8308d987d5d398%7C41caed736a0c468aba499ff6aafd1c77%7C0%7C0%7C637690174756253198%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=%2FMRyBfX7VM0vTqSMfLbwqCtr8Ad00olZlqgvB62DOBw%3D&reserved=0> INFO: Open of `https://dservices3.arcgis.com/fp1tibNcN9mbExhG/arcgis/services/BOMEC_15_Class_WFS/WFSServer?SERVICE=WFS&REQUEST=GetCapabilities<https://aus01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdservices3.arcgis.com%2Ffp1tibNcN9mbExhG%2Farcgis%2Fservices%2FBOMEC_15_Class_WFS%2FWFSServer%3FSERVICE%3DWFS%26REQUEST%3DGetCapabilities&data=04%7C01%7CBrent.Wood%40niwa.co.nz%7C4ef57eaa3412469bbb8308d987d5d398%7C41caed736a0c468aba499ff6aafd1c77%7C0%7C0%7C637690174756253198%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=I45hJ8vsYBkVcFvyBXp5kk4ThLAHokobBg3XDFnveqA%3D&reserved=0>' using driver `WFS' successful. Metadata: ABSTRACT=To develop a marine environment classification for waters in depths shallower than 3000 m within the outer boundary of the NZ 200 naut. mile EEZ (an OGC WFS Layer). TITLE=WFS 1: BOMEC_15_Class_WFS:BOMEC_15_Class (title: BOMEC_15_Class) (Multi Surface) not very helpful, but a 400 error might be some kind of encoding problem with request? cheers Ben On Tue, 5 Oct 2021 at 14:18, Brent Wood <brent.w...@niwa.co.nz<mailto:brent.w...@niwa.co.nz>> wrote: Hi, Apologies, this not strictly a Postgres question, but Postgres is so fundamental to what I'm trying to do and this list is generally so helpful, so here I go... I'm using FDW's to create virtual tables providing access to data from external data sources. This is working well for data in other Postgres databases using the Postgres FDW. I also want to be able to link to data from WFS services via the OGR FDW (https://www.pgxn.org/dist/ogr_fdw/<https://aus01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.pgxn.org%2Fdist%2Fogr_fdw%2F&data=04%7C01%7CBrent.Wood%40niwa.co.nz%7C4ef57eaa3412469bbb8308d987d5d398%7C41caed736a0c468aba499ff6aafd1c77%7C0%7C0%7C637690174756263153%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=IMqSDsY9Ian0t9y3xFnhapgtJiNf2Ya2rAHvR%2BU8zG8%3D&reserved=0>) The first service I'm trying to connect to is: https://dservices3.arcgis.com/fp1tibNcN9mbExhG/arcgis/services/BOMEC_15_Class_WFS/WFSServer<https://aus01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdservices3.arcgis.com%2Ffp1tibNcN9mbExhG%2Farcgis%2Fservices%2FBOMEC_15_Class_WFS%2FWFSServer&data=04%7C01%7CBrent.Wood%40niwa.co.nz%7C4ef57eaa3412469bbb8308d987d5d398%7C41caed736a0c468aba499ff6aafd1c77%7C0%7C0%7C637690174756263153%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=oxQTYKqK01EE9lbtYwrH9pK5WQRzVi460b4BUytg2Rs%3D&reserved=0> I can retrieve the capabilities doc in a browser (test 1 passed!) and plot the data as a layer in QGIS (test 2 passed). My next step is to test OGR access via ogrinfo. This I can't seem to get working. I'm assuming I need to sort this out before trying to get the OGR_FDW working. I've tried: ogrinfo https://dservices3.arcgis.com/fp1tibNcN9mbExhG/arcgis/services/BOMEC_15_Class_WFS/WFSServer<https://aus01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdservices3.arcgis.com%2Ffp1tibNcN9mbExhG%2Farcgis%2Fservices%2FBOMEC_15_Class_WFS%2FWFSServer&data=04%7C01%7CBrent.Wood%40niwa.co.nz%7C4ef57eaa3412469bbb8308d987d5d398%7C41caed736a0c468aba499ff6aafd1c77%7C0%7C0%7C637690174756273111%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=pf1ELtKgSielsb94hyylT9a4zdCWz0fmwzZYX5WyUTM%3D&reserved=0> ogrinfo https://dservices3.arcgis.com/fp1tibNcN9mbExhG/arcgis/services/BOMEC_15_Class_WFS/WFSServer<https://aus01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdservices3.arcgis.com%2Ffp1tibNcN9mbExhG%2Farcgis%2Fservices%2FBOMEC_15_Class_WFS%2FWFSServer&data=04%7C01%7CBrent.Wood%40niwa.co.nz%7C4ef57eaa3412469bbb8308d987d5d398%7C41caed736a0c468aba499ff6aafd1c77%7C0%7C0%7C637690174756273111%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=pf1ELtKgSielsb94hyylT9a4zdCWz0fmwzZYX5WyUTM%3D&reserved=0>?SERVICE=WFS&REQUEST=GetCapabilities I can only get the following response ogrinfo https://dservices3.arcgis.com/fp1tibNcN9mbExhG/arcgis/services/BOMEC_15_Class_WFS/WFSServer?SERVICE=WFS&REQUEST=GetCapabilities<https://aus01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdservices3.arcgis.com%2Ffp1tibNcN9mbExhG%2Farcgis%2Fservices%2FBOMEC_15_Class_WFS%2FWFSServer%3FSERVICE%3DWFS%26REQUEST%3DGetCapabilities&data=04%7C01%7CBrent.Wood%40niwa.co.nz%7C4ef57eaa3412469bbb8308d987d5d398%7C41caed736a0c468aba499ff6aafd1c77%7C0%7C0%7C637690174756283067%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=GCxcr0CTIWUyF2Om1EBZLmiXZqMjsNDB6ndglRwu1SI%3D&reserved=0> [1] 3121502 ERROR 1: HTTP error code : 400 ERROR 1: HTTP error code : 400 FAILURE: Unable to open datasource `https://dservices3.arcgis.com/fp1tibNcN9mbExhG/arcgis/services/BOMEC_15_Class_WFS/WFSServer?SERVICE=WFS<https://aus01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdservices3.arcgis.com%2Ffp1tibNcN9mbExhG%2Farcgis%2Fservices%2FBOMEC_15_Class_WFS%2FWFSServer%3FSERVICE%3DWFS&data=04%7C01%7CBrent.Wood%40niwa.co.nz%7C4ef57eaa3412469bbb8308d987d5d398%7C41caed736a0c468aba499ff6aafd1c77%7C0%7C0%7C637690174756283067%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=xnigrhqMNSexaPEl9E5FM%2B5NMrCiY0f3A%2FcVD3bqi3Q%3D&reserved=0>' with the following drivers. -> ESRIC ... -> OGR_PDS -> WFS -> OAPIF ... Can anyone suggest what might be the problem? Thanks. Brent Wood Principal Technician, Fisheries NIWA DDI: +64 (4) 3860529 [https://www.niwa.co.nz/static/niwa-2018-horizontal-180.png] <https://www.niwa.co.nz> Brent Wood Principal Technician - GIS and Spatial Data Management Programme Leader - Environmental Information Delivery +64-4-386-0529 National Institute of Water & Atmospheric Research Ltd (NIWA) 301 Evans Bay Parade Hataitai Wellington New Zealand Connect with NIWA: niwa.co.nz<https://www.niwa.co.nz> Facebook<https://aus01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.facebook.com%2Fnzniwa&data=04%7C01%7CBrent.Wood%40niwa.co.nz%7C4ef57eaa3412469bbb8308d987d5d398%7C41caed736a0c468aba499ff6aafd1c77%7C0%7C0%7C637690174756293023%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=Sq7F1A4H3hUoR%2BK3fMkZllRM6eJ51bjxhfsDf2U11fE%3D&reserved=0> LinkedIn<https://aus01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.linkedin.com%2Fcompany%2Fniwa&data=04%7C01%7CBrent.Wood%40niwa.co.nz%7C4ef57eaa3412469bbb8308d987d5d398%7C41caed736a0c468aba499ff6aafd1c77%7C0%7C0%7C637690174756293023%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=UB6iQB%2FQh%2BpR4JgF99u8AuYPT8dv9Cm16v%2B%2BurkWgvU%3D&reserved=0> Twitter<https://aus01.safelinks.protection.outlook.com/?url=https%3A%2F%2Ftwitter.com%2Fniwa_nz&data=04%7C01%7CBrent.Wood%40niwa.co.nz%7C4ef57eaa3412469bbb8308d987d5d398%7C41caed736a0c468aba499ff6aafd1c77%7C0%7C0%7C637690174756302980%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=mp%2BP6iXSlAab2qdjmf9NwhvdC68QdTFDbwWHiHlnfsQ%3D&reserved=0> Instagram<https://aus01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.instagram.com%2Fniwa_science&data=04%7C01%7CBrent.Wood%40niwa.co.nz%7C4ef57eaa3412469bbb8308d987d5d398%7C41caed736a0c468aba499ff6aafd1c77%7C0%7C0%7C637690174756302980%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=WvfyPiV74EAZ%2FPYtrtWmO62DOrmvNti07etImafBuCc%3D&reserved=0> To ensure compliance with legal requirements and to maintain cyber security standards, NIWA's IT systems are subject to ongoing monitoring, activity logging and auditing. This monitoring and auditing service may be provided by third parties. Such third parties can access information transmitted to, processed by and stored on NIWA's IT systems -- [Ausvet Logo]<https://aus01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.ausvet.com.au%2F&data=04%7C01%7CBrent.Wood%40niwa.co.nz%7C4ef57eaa3412469bbb8308d987d5d398%7C41caed736a0c468aba499ff6aafd1c77%7C0%7C0%7C637690174756312937%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=GnW86EosIgzv7lJFOVCznPeoVBNbU83YeDdGYO61S5U%3D&reserved=0> Dr Ben Madin BVMS MVPHMgmt PhD MANZCVS GAICD Managing Director Mobile: +61 448 887 220<tel:+61448887220> E-mail: b...@ausvet.com.au<mailto:b...@ausvet.com.au> Website: www.ausvet.com.au<https://aus01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.ausvet.com.au%2F&data=04%7C01%7CBrent.Wood%40niwa.co.nz%7C4ef57eaa3412469bbb8308d987d5d398%7C41caed736a0c468aba499ff6aafd1c77%7C0%7C0%7C637690174756312937%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=GnW86EosIgzv7lJFOVCznPeoVBNbU83YeDdGYO61S5U%3D&reserved=0> Skype: benmadin Address: 5 Shuffrey Street Fremantle, WA 6160 Australia