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.

Parameter

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 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 dictionaries 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

Copyright information for the layer.

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

Get/Set the opacity value.

Parameter

Description

value

Required float. 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: A case-insensitive dict like object used to update and alter JSON A variant of a case-less dictionary that allows for dot and bracket notation.

property scale

Gets/Sets the Min/Max Scale for the layer

Parameter

Description

value

Required tuple. (Min_value, Max_value)

Returns

A tuple (min, max)

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

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

Parameter

Description

value

Required string. Name of title

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).

Parameter

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

Copyright information for the layer.

property opacity

Get/Set the opacity value.

Parameter

Description

value

Required float. 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

Parameter

Description

value

Required tuple. (Min_value, Max_value)

Returns

A tuple (min, max)

property title

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

Parameter

Description

value

Required string. Name of title

Returns

String

property url

Get/Set the data associated with the GeoJSON Layer

Returns

String

GeoRSSLayer

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

Bases: arcgis.mapping.ogc._base.BaseOGC

The GeoRSSLayer class is used to create a layer based on GeoRSS. GeoRSS is a way to add geographic information to an RSS feed. The GeoRSSLayer supports both GeoRSS-Simple and GeoRSS GML encodings, and multiple geometry types.

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

Parameter

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

Copyright information for the layer.

property line_symbol

Gets/Sets the Line Symbol for Polyline Geometries

Returns

InsensitiveDict: A case-insensitive dict like object used to update and alter JSON A variants of a case-less dictionary that allows for dot and bracket notation.

property opacity

Get/Set the opacity value.

Parameter

Description

value

Required float. 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: A case-insensitive dict like object used to update and alter JSON A variants of a case-less dictionary that allows for dot and bracket notation.

property polygon_symbol

Gets/Sets the Polygon Symbol for Polygon Geometries

Returns

InsensitiveDict: A case-insensitive dict like object used to update and alter JSON A variants of a case-less dictionary that allows for dot and bracket notation.

property properties

Returns the properties of the Layer.

Returns

PropertyMap

property scale

Gets/Sets the Min/Max Scale for the layer

Parameter

Description

value

Required tuple. (Min_value, Max_value)

Returns

A tuple (min, max)

property title

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

Parameter

Description

value

Required string. Name of title

Returns

String

OGCFeatureService

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

Bases: object

Represents the Hosted OGC Feature Server

Parameter

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, gis=None)

Bases: object

Represents a single OGC dataset

Parameter

Description

url

Required String. The web address endpoint.

gis

Optional GIS. The connection object.

get(feature_id)

Gets an individual feature on the service. Needs to correspond to an id of the feature.

Returns

Dict[str, Any]

property properties

returns the service properties

query(query=None, limit=10000, bbox=None, bbox_sr=None, time_filter=None, return_all=False, **kwargs)

Queries the OGCFeatureService Layer and returns back the information as a Spatially Enabled DataFrame.

Parameter

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.

Parameter

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

Copyright information for the layer.

property layers

returns the layers of the WMS Layer

property opacity

Get/Set the opacity value.

Parameter

Description

value

Required float. 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

Parameter

Description

value

Required tuple. (Min_value, Max_value)

Returns

A tuple (min, max)

property title

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

Parameter

Description

value

Required string. Name of title

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.

Parameter

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

Copyright information for the layer.

property opacity

Get/Set the opacity value.

Parameter

Description

value

Required float. 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

Parameter

Description

value

Required tuple. (Min_value, Max_value)

Returns

A tuple (min, max)

property title

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

Parameter

Description

value

Required string. Name of title

Returns

String

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.