Package: gjtk
gjtkis a library for working withGeoJSON. It aims to be as compliant with the specification (soonstandard, hopefully) as possible.Installationgjtkis available onPyPI.pipinstallgjtkUsageimportgjtkModulesgjtk.extractMethodDescriptionpositions_of(geojson)returns all the Positions in a validGeoJSON objectfeatures_of(geojson)returns all the Features in a validGeoJSON objectgeometries_of(geojson)returns all the Geometries in a validGeoJSON objectgjtk.generateMethodDescriptionpoint(position)returns a validPointmulti_point(coordinates)returns a validMultiPointline_string(coordinates)returns a validLineStringmulti_line_string(coordinates)returns a validMultiLineStringpolygon(coordinates)returns a validPolygonmulti_polygon(coordinates)returns a validMultiPolygongeometry_collection(geometries)returns a validGeometryCollectionfeature(geometry, properties)returns a validFeaturefeature_collection(features)returns a validFeatureCollectiongjtk.randomMethodDescriptionposition(max_numbers=3, min_numbers=2)returns a randomPositionpoint_coordinates()returns randomPointcoordinatesmulti_point_coordinates(max_positions=6, min_positions=0)returns randomMultiPointcoordinatesline_string_coordinates(max_positions=6, min_positions=2)returns randomLineStringcoordinateslinear_ring_coordinates()returns randomLinearRingcoordinatesmulti_line_string_coordinates(max_line_strings=6, min_line_strings=1)returns randomMultiLineStringcoordinatespolygon_coordinates()returns randomPolygoncoordinatesmulti_polygon_coordinates(max_polygons=6, min_polygons=1)returns randomMultiPolygoncoordinatesgeometry()returns a randomGeometrypoint()returns a randomPointmulti_point()returns a randomMultiPointline_string()returns a randomLineStringmulti_line_string()returns a randomMultiLineStringpolygon()returns a randomPolygonmulti_polygon()returns a randomMultiPolygongeometry_collection(max_geometries=3, min_geometries=0)returns a randomGeometryCollectionfeature()returns a randomFeaturefeature_collection(max_features=3, min_features=0)returns a randomFeatureCollectioncrs()returns a randomCRSlink()returns a randomLinkbbox(max_dimensions=4, min_dimensions=2)returns a randomBboxgjtk.validateMethodDescriptionis_geojson(anything)returnsTruewhen passed a validGeoJSON object, otherwiseFalseis_geometry(anything)returnsTruewhen passed a validGeometry, otherwiseFalseis_position(anything)returnsTruewhen passed a validPosition, otherwiseFalseis_point_coordinates(anything)returnsTruewhen passed validPointcoordinates, otherwiseFalseis_multi_point_coordinates(anything)returnsTruewhen passed validMultiPointcoordinates, otherwiseFalseis_line_string_coordinates(anything)returnsTruewhen passed validLineStringcoordinates, otherwiseFalseis_linear_ring_coordinates(anything)returnsTruewhen passed validLinearRingcoordinates, otherwiseFalseis_multi_line_string_coordinates(anything)returnsTruewhen passed validMultiLineStringcoordinates, otherwiseFalseis_polygon_coordinates(anything)returnsTruewhen passed validPolygoncoordinates, otherwiseFalseis_multi_polygon_coordinates(anything)returnsTruewhen passed validMultiPolygoncoordinates, otherwiseFalseis_point(anything)returnsTruewhen passed a validPoint, otherwiseFalseis_multi_point(anything)returnsTruewhen passed a validMultiPoint, otherwiseFalseis_line_string(anything)returnsTruewhen passed a validLineString, otherwiseFalseis_multi_line_string(anything)returnsTruewhen passed a validMultiLineString, otherwiseFalseis_polygon(anything)returnsTruewhen passed a validPolygon, otherwiseFalseis_multi_polygon(anything)returnsTruewhen passed a validMultiPolygon, otherwiseFalseis_geometry_collection(anything)returnsTruewhen passed a validGeometryCollection, otherwiseFalseis_feature(anything)returnsTruewhen passed a validFeature, otherwiseFalseis_feature_collection(anything)returnsTruewhen passed a validFeature Collection, otherwiseFalseis_crs(anything)returnsTruewhen passed a validCRS, otherwiseFalsehas_crs(anything)returnsTruewhen passed aGeoJSON objectthat validly specifies aCRS, otherwiseFalseis_link(anything)returnsTruewhen passed a validLink, otherwiseFalseis_bbox(anything)returnsTruewhen passed a validBbox, otherwiseFalsehas_bbox(anything)returnsTruewhen passed aGeoJSON objectthat validly specifies aBbox, otherwiseFalseequal_positions(position1, position2)returnsTruewhen all parameters are identicalPositions, otherwiseFalsecontained_polygon(innerLinearRing, outerLinearRing)returnsTruewhen oneLinearRingcontains another, otherwiseFalseLicenseCopyright (C) 2016 David TuckerThis library is free software; you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation; either version 2.1 of the License, or (at
your option) any later version.This library is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser
General Public License for more details.You should have received a copy of the GNU Lesser General Public License
along with this library; if not, write to the Free Software Foundation,
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA