# arcgis.mapping.ogc module¶

## CSVLayer¶

class arcgis.mapping.ogc.CSVLayer(url_or_item, gis=None, **kwargs)

Bases: arcgis.mapping.ogc._base.BaseOpenData

Represents a CSV File Hosted on a Server.

 Argument Description url_or_item Required String or Item. The web address or Item to the CSV resource. gis Optional GIS. The GIS used to reference the service. The arcgis.env.active_gis is used if not specified. copyright Optional String. Describes limitations and usage of the data. delimiter Optional String. The separator value. This can be the following: , (comma), ‘ ‘ (space), | (pipe), \r (tab), or ; (semicolon). fields Optional List. An array of dictionarys containing the field information. opacity Optional Float. This value can range between 1 and 0, where 0 is 100 percent transparent and 1 is completely opaque. scale Optional Tuple. The min/max scale of the layer where the positions are: (min, max) as float values. sql_expression Optional String. Optional query string to apply to the layer when displayed on the widget or web map. title Optional String. The title of the layer used to identify it in places such as the Legend and Layer List widgets.
property copyright

property delimiter

Gets/Sets the delimiter for the CSV Layer. The default is ,

 Values Description , Comma ” “ space ; semicolon pipe r tab
Returns

string

property df

returns the CSV file as a DataFrame

Returns

Pandas’ DataFrame

property fields

Returns the fields values for the CSV source.

Returns

list of strings

property latitude

The latitude field name. If not specified, the class will look for following field names in the CSV source: “lat”, “latitude”, “y”, “ycenter”, “latitude83”, “latdecdeg”, “POINT-Y”.

property longitude

The longitude field name. If not specified, the CSVLayer will look for following field names in the CSV source: “lon”, “lng”, “long”, “longitude”, “x”, “xcenter”, “longitude83”, “longdecdeg”, “POINT-X”.

property opacity

This value can range between 1 and 0, where 0 is 100 percent transparent and 1 is completely opaque.

Returns

Float

property properties

Returns the properties of the Layer.

Returns

PropertyMap

property renderer

Get/Set the Renderer of the CSV Layer

Returns

InsensitiveDict

property scale

Gets/Sets the Min/Max Scale for the layer

property sql_expression

The SQL where clause used to filter features on the client. Only the features that satisfy the definition expression are displayed in the widget. Setting a definition expression is useful when the dataset is large and you don’t want to bring all features to the client for analysis. The sql_expressions may be set when a layer is constructed prior to it loading in the view or after it has been loaded into the class.

Returns

String

property title

The title of the layer used to identify it in places such as the Legend and LayerList widgets.

Returns

String

## GeoJSONLayer¶

class arcgis.mapping.ogc.GeoJSONLayer(url=None, data=None, **kwargs)

Bases: arcgis.mapping.ogc._base.BaseOGC

The GeoJSONLayer class is used to create a layer based on GeoJSON. GeoJSON is a format for encoding a variety of geographic data structures. The GeoJSON data must comply with the RFC 7946 specification which states that the coordinates are in spatial reference: WGS84 (wkid 4326).

 Argument Description url Optional string. The web location of the GeoJSON file. data Optional String or Dict. A path to a GeoJSON file, the GeoJSON data as a string, or the GeoJSON data as a dictionary. copyright Optional String. Describes limitations and usage of the data. opacity Optional Float. This value can range between 1 and 0, where 0 is 100 percent transparent and 1 is completely opaque. renderer Optional Dictionary. A custom set of symbology for the given geojson dataset. scale Optional Tuple. The min/max scale of the layer where the positions are: (min, max) as float values. title Optional String. The title of the layer used to identify it in places such as the Legend and Layer List widgets.
property copyright

property opacity

This value can range between 1 and 0, where 0 is 100 percent transparent and 1 is completely opaque.

Returns

Float

property properties

Returns the properties of the Layer.

Returns

PropertyMap

property renderer

Gets/Sets the renderer for the layer

property scale

Gets/Sets the Min/Max Scale for the layer

property title

The title of the layer used to identify it in places such as the Legend and LayerList widgets.

Returns

String

property url

Get/Set the data associated with the GeoJSON Layer

Returns

String

class arcgis.mapping.ogc.GeoRSSLayer(url, **kwargs)

Bases: arcgis.mapping.ogc._base.BaseOGC

It exports custom RSS tags as additional attribute fields in the form of simple strings or an array of JSON objects.

 Argument Description url Required string. The URL of the GeoRSS sevice. copyright Optional String. Describes limitations and usage of the data. line_symbol Optional Dict. The symbol for the polyline data in the GeoRSS. opacity Optional Float. This value can range between 1 and 0, where 0 is 100 percent transparent and 1 is completely opaque. point_symbol Optional Dict. The symbol for the point data in the GeoRSS. polygon_symbol Optional Dict. The symbol for the polygon data in the GeoRSS. title Optional String. The title of the layer used to identify it in places such as the Legend and LayerList widgets. scale Optional Tuple. The min/max scale of the layer where the positions are: (min, max) as float values.
property copyright

property line_symbol

Gets/Sets the Line Symbol for Polyline Geometries

Returns

InsensitiveDict

property opacity

This value can range between 1 and 0, where 0 is 100 percent transparent and 1 is completely opaque.

Returns

Float

property point_symbol

Gets/Sets the Point Symbol for Point Geometries

Returns

InsensitiveDict

property polygon_symbol

Gets/Sets the Polygon Symbol for Polygon Geometries

Returns

InsensitiveDict

property properties

Returns the properties of the Layer.

Returns

PropertyMap

property scale

Gets/Sets the Min/Max Scale for the layer

property title

The title of the layer used to identify it in places such as the Legend and LayerList widgets.

Returns

String

## OGCFeatureService¶

class arcgis.mapping.ogc.OGCFeatureService(url, gis=None)

Bases: object

Represents the Hosted OGC Feature Server

 Argument Description url Required String. The web address endpoint. gis Optional GIS. The connection object.
property collections

Yields all the OGC Feature Service Layers within the service.

Returns

Iterator[OGCCollection]

property conformance

Provides the API conformance with the OGC standard.

Returns

Dict[str, Any]

property properties

returns the service properties

## OGCCollection¶

class arcgis.mapping.ogc.OGCCollection(url: str, gis: arcgis.gis.GIS = None)

Bases: object

Represents a single OGC dataset

 Argument Description url Required String. The web address endpoint. gis Optional GIS. The connection object.
get(feature_id: int) → Dict[str, Any]

Gets an individual feature on the service

Returns

Dict[str, Any]

property properties

returns the service properties

query(query: str = None, limit: int = 10000, bbox: List[float] = None, bbox_sr: int = None, time_filter: str = None, return_all=False, **kwargs) → Union[Dict[str, Any], pandas.core.frame.DataFrame]

Queries the OGC Feature Service Layer and Returns back the information as a Spatially Enabled DataFrame.

 Argument Description query Optional String. A SQL based query applied to the service. limit Optional Integer. The number of records to limit to. The default is 10,000. bbox Optional List[float]. The bounding box to limit search in. bbox_sr Optional Integer. The coordinate reference system as a WKID. time_filter Optional String. The dates to filter time by.
Returns

Union[Dict[str, Any], pd.DataFrame]

## WMSLayer¶

class arcgis.mapping.ogc.WMSLayer(url, version='1.3.0', gis=None, **kwargs)

Bases: arcgis.mapping.ogc._base.BaseOGC

Represents a Web Map Service, which is an OGC web service endpoint.

 Argument Description url Required string. The administration URL for the ArcGIS Server. version Optional String. The version number of the WMS service. The default is 1.3.0. gis Optional GIS. The GIS used to reference the service by. The arcgis.env.active_gis is used if not specified. copyright Optional String. Describes limitations and usage of the data. scale Optional Tuple. The min/max scale of the layer where the positions are: (min, max) as float values. opacity Optional Float. This value can range between 1 and 0, where 0 is 100 percent transparent and 1 is completely opaque. title Optional String. The title of the layer used to identify it in places such as the Legend and Layer List widgets.
property copyright

property layers

returns the layers of the WMS Layer

property opacity

This value can range between 1 and 0, where 0 is 100 percent transparent and 1 is completely opaque.

Returns

Float

property properties

Returns the properties of the Layer.

Returns

PropertyMap

property scale

Gets/Sets the Min/Max Scale for the layer

property title

The title of the layer used to identify it in places such as the Legend and LayerList widgets.

Returns

String

## WMTSLayer¶

class arcgis.mapping.ogc.WMTSLayer(url, version='1.0.0', gis=None, **kwargs)

Bases: arcgis.mapping.ogc._base.BaseOGC

Represents a Web Map Tile Service, which is an OGC web service endpoint.

 Argument Description url Required string. The web address of the endpoint. version Optional String. The version number of the WMTS service. The default is 1.0.0 gis Optional GIS. The GIS used to reference the service by. The arcgis.env.active_gis is used if not specified. copyright Optional String. Describes limitations and usage of the data. opacity Optional Float. This value can range between 1 and 0, where 0 is 100 percent transparent and 1 is completely opaque. scale Optional Tuple. The min/max scale of the layer where the positions are: (min, max) as float values. title Optional String. The title of the layer used to identify it in places such as the Legend and Layer List widgets.
property copyright

property opacity

This value can range between 1 and 0, where 0 is 100 percent transparent and 1 is completely opaque.

Returns

Float

property properties

Returns the properties of the Layer.

Returns

PropertyMap

property scale

Gets/Sets the Min/Max Scale for the layer

property title

The title of the layer used to identify it in places such as the Legend and LayerList widgets.

Returns

String