Commit graph

9 commits

Author SHA1 Message Date
Lars Kiesow
0eb12f9133
Prevent XML Denial of Service Attacks
This patch prevents entity expansion for provided XML content to guard
against XML denial of service attacks like XML bomb or Billion laughs
attack.
2020-01-28 17:29:11 +01:00
Henry Walshaw
66f8bdb45e Fix errors from make test
One Python 2.7 error in the test (didn’t work for points)

Also fixed all the formatting errors raised by flake8
2019-07-29 10:24:02 +10:00
Henry Walshaw
b02278e536 Fix a really dumb formatting issue for the geom_interface
Use the old formatting tag instead of the new when creating geom text
from the geo_interface. Tests updated as well
2019-07-08 15:16:20 +10:00
Henry Walshaw
8cd50bf768 Add unit tests for simple GeoRSS
Also fix a couple of bugs that came up during testing - mostly making
sure that elevation, floor and radius are actually set as strings in
the XML
2019-07-08 14:58:21 +10:00
Henry Walshaw
8d413f576f Add a geom_from_geo_interface method for GeoRSS Entry
A standard way for different geometry libraries in Python to be
interoperable is a `__geo_interface__` for the geometry (see the
specification: https://gist.github.com/sgillies/2217756). This
includes the shapely library, geometries from QGIS, and geometries in
Esri's arcpy libraries for ArcGIS desktop and ArcGIS pro.

To make it easier to generate a georss entry a simple method which
does the conversion (of the supported geometries only) and sets the
appropriate geometry type.

This includes a custom error for the geometry being incompatible and a
custom warning for a polygon with interior holes. This is done to
store the geometries on the exception / warning if required for
debugging.
2019-07-08 13:38:39 +10:00
Henry Walshaw
642862bb2b Update simple GeoRSS to complete the specification
Originally the georss entry only contained a simple point
specification. Update to include:

- other geometries (line, polygon and box)
- additional properties (featuretypetag, relationshiptag, featurename)
- elevation (elev, floor)
- radius (radius)

This also includes basic type checking with a value error for the
elev, floor and radius tags.
2019-07-08 12:36:16 +10:00
Lars Kiesow
27e9cd0c9a
Fixed GeoRSS Extemsion
This patch fixes a few issues with pzll request #66 which adds supprt
for a simple GeoRSS extension.
2018-03-04 22:55:57 +01:00
Bob Breznak
ae5759d133 Better format Geo and GeoEntry. Add test for Geo Extension 2017-09-12 15:50:05 -04:00
Bob Breznak
c0a1acc18c Add Simple GeoRSS support 2017-09-12 10:50:26 -04:00