WFSServer outputformat=Shape+Zip not functioning, CSV not showing field names

2768
7
Jump to solution
06-22-2020 02:05 PM
SeanLawrence
New Contributor II

Has anyone been able to successfully get a MapServer/WFSServer outputformat Shape+Zip functioning on their Federated ArcGIS Server?  I've tried multiple things and checked my logs to no avail...Also, the CSV outputformat is not showing all field names...very weird.  All other output formats from WFS working like a champ.

Running 10.7.1, Federated Server

WFS 2.0.0

https://arcgis.dvrpc.org/portal/services/Transportation/BicycleCounts/MapServer/WFSServer?request=Ge...

https://arcgis.dvrpc.org/portal/services/Transportation/BicycleCounts/MapServer/WFSServer?request=Ge...

Formatting URL with encoded + as %2B and no dice, returns a server error Could not access any server machines. Please contact your system administrator.

 

Here's the CSV issue 

https://arcgis.dvrpc.org/portal/services/Transportation/BicycleCounts/MapServer/WFSServer?request=Ge...

https://arcgis.dvrpc.org/portal/services/Transportation/BicycleCounts/MapServer/WFSServer?request=Ge...

0 Kudos
1 Solution

Accepted Solutions
HalilSiddique
Occasional Contributor II

It was previously a bug when i reported it in 2018, while using 10.5.1, looks like they have fixed it for 10.8

BUG-000115917 - WFS services do not return the output format SHAPE+ZIP although it is listed as a supported format in the Capabilities file.

Page 12 on the ArcGIS 10.8 Issues Addressed List document.  https://downloads.esri.com/support/downloads/other_/108-IssuesAddressedList-02132020.pdf 

View solution in original post

7 Replies
DerrickWong
Esri Contributor

Hi Sean Lawrence

I had a look at the description of the feature type:

https://arcgis.dvrpc.org/portal/services/Transportation/BicycleCounts/MapServer/WFSServer?service=wf... 

This XML file does not appear to have any style information associated with it. The document tree is shown below.
<xsd:schema xmlns:Transportation_BicycleCounts="https://arcgis.dvrpc.org/portal/services/Transportation/BicycleCounts/MapServer/WFSServer" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:gml="http://www.opengis.net/gml/3.2" targetNamespace="https://arcgis.dvrpc.org/portal/services/Transportation/BicycleCounts/MapServer/WFSServer" elementFormDefault="qualified" attributeFormDefault="unqualified">
<xsd:import namespace="http://www.opengis.net/gml/3.2" schemaLocation="http://schemas.opengis.net/gml/3.2.1/gml.xsd"/>
<xsd:element name="BicycleCounts" type="Transportation_BicycleCounts:BicycleCountsFeatureType" substitutionGroup="gml:AbstractFeature"/>
<xsd:complexType name="BicycleCountsFeatureType">
<xsd:complexContent>
<xsd:extension base="gml:AbstractFeatureType">
<xsd:sequence>
<xsd:element minOccurs="0" maxOccurs="1" name="recordnum" nillable="true" type="xsd:int"/>
<xsd:element minOccurs="0" maxOccurs="1" name="takenby" nillable="true">
<xsd:simpleType>
...
</xsd:simpleType>
</xsd:element>
<xsd:element minOccurs="0" maxOccurs="1" name="COMMENTS" nillable="true">
<xsd:simpleType>
...
</xsd:simpleType>
</xsd:element>
<xsd:element minOccurs="0" maxOccurs="1" name="SETDATE" nillable="true" type="xsd:dateTime"/>
<xsd:element minOccurs="0" maxOccurs="1" name="SETYEAR" nillable="true" type="xsd:int"/>
<xsd:element minOccurs="0" maxOccurs="1" name="MCD" nillable="true">
<xsd:simpleType>
...
</xsd:simpleType>
</xsd:element>
<xsd:element minOccurs="0" maxOccurs="1" name="ROUTE" nillable="true">
<xsd:simpleType>
...
</xsd:simpleType>
</xsd:element>
<xsd:element minOccurs="0" maxOccurs="1" name="ROAD" nillable="true">
<xsd:simpleType>
...
</xsd:simpleType>
</xsd:element>
<xsd:element minOccurs="0" maxOccurs="1" name="CNTDIR" nillable="true">
<xsd:simpleType>
...
</xsd:simpleType>
</xsd:element>
<xsd:element minOccurs="0" maxOccurs="1" name="FROMLMT" nillable="true">
<xsd:simpleType>
...
</xsd:simpleType>
</xsd:element>
<xsd:element minOccurs="0" maxOccurs="1" name="tolmt" nillable="true">
<xsd:simpleType>
...
</xsd:simpleType>
</xsd:element>
<xsd:element minOccurs="0" maxOccurs="1" name="TYPE" nillable="true">
<xsd:simpleType>
...
</xsd:simpleType>
</xsd:element>
<xsd:element minOccurs="0" maxOccurs="1" name="LATITUDE" nillable="true" type="xsd:double"/>
<xsd:element minOccurs="0" maxOccurs="1" name="longitude" nillable="true" type="xsd:double"/>
<xsd:element minOccurs="0" maxOccurs="1" name="factor" nillable="true" type="xsd:double"/>
<xsd:element minOccurs="0" maxOccurs="1" name="axle" nillable="true" type="xsd:double"/>
<xsd:element minOccurs="0" maxOccurs="1" name="outdir" nillable="true">
<xsd:simpleType>
...
</xsd:simpleType>
</xsd:element>
<xsd:element minOccurs="0" maxOccurs="1" name="indir" nillable="true">
<xsd:simpleType>
...
</xsd:simpleType>
</xsd:element>
<xsd:element minOccurs="0" maxOccurs="1" name="AADB" nillable="true" type="xsd:int"/>
<xsd:element minOccurs="0" maxOccurs="1" name="PROGRAM" nillable="true">
<xsd:simpleType>
...
</xsd:simpleType>
</xsd:element>
<xsd:element minOccurs="0" maxOccurs="1" name="bikepedgroup" nillable="true">
<xsd:simpleType>
...
</xsd:simpleType>
</xsd:element>
<xsd:element minOccurs="0" maxOccurs="1" name="bikepedfacility" nillable="true">
<xsd:simpleType>
...
</xsd:simpleType>
</xsd:element>
<xsd:element minOccurs="0" maxOccurs="1" name="co_name" nillable="true">
<xsd:simpleType>
...
</xsd:simpleType>
</xsd:element>
<xsd:element minOccurs="0" maxOccurs="1" name="mun_name" nillable="true">
<xsd:simpleType>
...
</xsd:simpleType>
</xsd:element>
<xsd:element minOccurs="0" maxOccurs="1" name="id" type="xsd:int"/>
<xsd:element minOccurs="0" maxOccurs="1" name="geom" nillable="true" type="gml:PointPropertyType"/>
</xsd:sequence>
</xsd:extension>
</xsd:complexContent>
</xsd:complexType>
</xsd:schema>

I only had a really quick look. Which fields are missing?

GmlId,,Shape
BicycleCounts.28245,70619,"jh","Seasonal factor are calculated from 2015 permanent station data. ",2010-08-26T00:00:00,2010,"4210160103","","ben franklin pkwy inner la northbound","north","21st st","22nd st","Bicycle 1",39.960823,-75.174336,0.888,1.1797,"","",269,"Project","Mixed","Bike Lane","Philadelphia","Central",28245,"POINT (-75.17433599999998 39.96082300000006)"

0 Kudos
IhabHassan
Esri Contributor

Hi Sean

Is the export to SHP / CSV working from the base MapServer service? if not, then my guess is that one of attributes names is causing the issue. If I remember correctly, SHP file has restrictions on attributes name length, but not sure what might be causing the issue for CSV.

Regards
Ihab
DerrickWong
Esri Contributor

Hi Ihab Hassan

Yeah, shapefile has 10 character limit for column names, but they will get truncated with a "_" at the end if they are too long.

The other thing I can think of with the fields not showing in the CSV may be the data containing commas (",") and they are not escaping correctly.

IhabHassan
Esri Contributor

I second that 

Regards
Ihab
SeanLawrence
New Contributor II

All features and field names show up when converting the MapService JSON to Shapefile/CSV.  Missing field names in the WFS output format as CSV is the issue.

0 Kudos
HalilSiddique
Occasional Contributor II

It was previously a bug when i reported it in 2018, while using 10.5.1, looks like they have fixed it for 10.8

BUG-000115917 - WFS services do not return the output format SHAPE+ZIP although it is listed as a supported format in the Capabilities file.

Page 12 on the ArcGIS 10.8 Issues Addressed List document.  https://downloads.esri.com/support/downloads/other_/108-IssuesAddressedList-02132020.pdf 

HalilSiddique
Occasional Contributor II

I've just tried it on 10.8.1, still same issue.

Has anyone ever got it working?

0 Kudos