code
stringlengths
1
1.49M
vector
listlengths
0
7.38k
snippet
listlengths
0
7.38k
# Geo-enabled Sitemap classes. from django.contrib.gis.sitemaps.georss import GeoRSSSitemap from django.contrib.gis.sitemaps.kml import KMLSitemap, KMZSitemap
[ [ 1, 0, 0.5, 0.25, 0, 0.66, 0, 81, 0, 1, 0, 0, 81, 0, 0 ], [ 1, 0, 0.75, 0.25, 0, 0.66, 1, 933, 0, 2, 0, 0, 933, 0, 0 ] ]
[ "from django.contrib.gis.sitemaps.georss import GeoRSSSitemap", "from django.contrib.gis.sitemaps.kml import KMLSitemap, KMZSitemap" ]
from django.contrib.gis.geos import ( GEOSGeometry as Geometry, GEOSException as GeometryException)
[ [ 1, 0, 0.75, 1, 0, 0.66, 0, 886, 0, 2, 0, 0, 886, 0, 0 ] ]
[ "from django.contrib.gis.geos import (\n GEOSGeometry as Geometry, GEOSException as GeometryException)" ]
from django.conf import settings from django.core.exceptions import ImproperlyConfigured from django.utils.importlib import import_module geom_backend = getattr(settings, 'GEOMETRY_BACKEND', 'geos') try: module = import_module('.%s' % geom_backend, 'django.contrib.gis.geometry.backend') except ImportError: tr...
[ [ 1, 0, 0.0476, 0.0476, 0, 0.66, 0, 128, 0, 1, 0, 0, 128, 0, 0 ], [ 1, 0, 0.0952, 0.0476, 0, 0.66, 0.2, 160, 0, 1, 0, 0, 160, 0, 0 ], [ 1, 0, 0.1429, 0.0476, 0, 0.6...
[ "from django.conf import settings", "from django.core.exceptions import ImproperlyConfigured", "from django.utils.importlib import import_module", "geom_backend = getattr(settings, 'GEOMETRY_BACKEND', 'geos')", "try:\n module = import_module('.%s' % geom_backend, 'django.contrib.gis.geometry.backend')\ne...
import re # Regular expression for recognizing HEXEWKB and WKT. A prophylactic measure # to prevent potentially malicious input from reaching the underlying C # library. Not a substitute for good Web security programming practices. hex_regex = re.compile(r'^[0-9A-F]+$', re.I) wkt_regex = re.compile(r'^(SRID=(?P<srid...
[ [ 1, 0, 0.0833, 0.0833, 0, 0.66, 0, 540, 0, 1, 0, 0, 540, 0, 0 ], [ 14, 0, 0.5, 0.0833, 0, 0.66, 0.3333, 439, 3, 2, 0, 0, 821, 10, 1 ], [ 14, 0, 0.75, 0.4167, 0, 0....
[ "import re", "hex_regex = re.compile(r'^[0-9A-F]+$', re.I)", "wkt_regex = re.compile(r'^(SRID=(?P<srid>\\-?\\d+);)?'\n r'(?P<wkt>'\n r'(?P<type>POINT|LINESTRING|LINEARRING|POLYGON|MULTIPOINT|MULTILINESTRING|MULTIPOLYGON|GEOMETRYCOLLECTION)'\n r'[...
from django.contrib.gis.geos import GEOSGeometry, LinearRing, Polygon, Point from django.contrib.gis.maps.google.gmap import GoogleMapException from django.utils.six.moves import xrange from math import pi, sin, log, exp, atan # Constants used for degree to radian conversion, and vice-versa. DTOR = pi / 180. RTOD = 18...
[ [ 1, 0, 0.0062, 0.0062, 0, 0.66, 0, 886, 0, 4, 0, 0, 886, 0, 0 ], [ 1, 0, 0.0123, 0.0062, 0, 0.66, 0.1667, 633, 0, 1, 0, 0, 633, 0, 0 ], [ 1, 0, 0.0185, 0.0062, 0, ...
[ "from django.contrib.gis.geos import GEOSGeometry, LinearRing, Polygon, Point", "from django.contrib.gis.maps.google.gmap import GoogleMapException", "from django.utils.six.moves import xrange", "from math import pi, sin, log, exp, atan", "DTOR = pi / 180.", "RTOD = 180. / pi", "class GoogleZoom(object)...
from django.contrib.gis.geos import fromstr, Point, LineString, LinearRing, Polygon from django.utils.functional import total_ordering from django.utils.safestring import mark_safe from django.utils import six from django.utils.encoding import python_2_unicode_compatible @python_2_unicode_compatible class GEvent(obje...
[ [ 1, 0, 0.0032, 0.0032, 0, 0.66, 0, 886, 0, 5, 0, 0, 886, 0, 0 ], [ 1, 0, 0.0064, 0.0032, 0, 0.66, 0.1, 375, 0, 1, 0, 0, 375, 0, 0 ], [ 1, 0, 0.0096, 0.0032, 0, 0.6...
[ "from django.contrib.gis.geos import fromstr, Point, LineString, LinearRing, Polygon", "from django.utils.functional import total_ordering", "from django.utils.safestring import mark_safe", "from django.utils import six", "from django.utils.encoding import python_2_unicode_compatible", "class GEvent(objec...
""" This module houses the GoogleMap object, used for generating the needed javascript to embed Google Maps in a Web page. Google(R) is a registered trademark of Google, Inc. of Mountain View, California. Example: * In the view: return render_to_response('template.html', {'google' : GoogleMap(key="...
[ [ 8, 0, 0.4836, 0.9508, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.9672, 0.0164, 0, 0.66, 0.3333, 633, 0, 2, 0, 0, 633, 0, 0 ], [ 1, 0, 0.9836, 0.0164, 0, 0.66...
[ "\"\"\"\n This module houses the GoogleMap object, used for generating\n the needed javascript to embed Google Maps in a Web page.\n\n Google(R) is a registered trademark of Google, Inc. of Mountain View, California.\n\n Example:", "from django.contrib.gis.maps.google.gmap import GoogleMap, GoogleMapSet", ...
from django.conf import settings from django.template.loader import render_to_string from django.utils.html import format_html from django.utils.safestring import mark_safe from django.utils.six.moves import xrange from django.contrib.gis.maps.google.overlays import GPolygon, GPolyline, GMarker class GoogleMapExcepti...
[ [ 1, 0, 0.0043, 0.0043, 0, 0.66, 0, 128, 0, 1, 0, 0, 128, 0, 0 ], [ 1, 0, 0.0086, 0.0043, 0, 0.66, 0.1111, 970, 0, 1, 0, 0, 970, 0, 0 ], [ 1, 0, 0.0129, 0.0043, 0, ...
[ "from django.conf import settings", "from django.template.loader import render_to_string", "from django.utils.html import format_html", "from django.utils.safestring import mark_safe", "from django.utils.six.moves import xrange", "from django.contrib.gis.maps.google.overlays import GPolygon, GPolyline, GM...
from __future__ import unicode_literals from django.contrib.syndication.views import Feed as BaseFeed from django.utils.feedgenerator import Atom1Feed, Rss201rev2Feed class GeoFeedMixin(object): """ This mixin provides the necessary routines for SyndicationFeed subclasses to produce simple GeoRSS or W3C G...
[ [ 1, 0, 0.0073, 0.0073, 0, 0.66, 0, 777, 0, 1, 0, 0, 777, 0, 0 ], [ 1, 0, 0.0219, 0.0073, 0, 0.66, 0.1429, 264, 0, 1, 0, 0, 264, 0, 0 ], [ 1, 0, 0.0292, 0.0073, 0, ...
[ "from __future__ import unicode_literals", "from django.contrib.syndication.views import Feed as BaseFeed", "from django.utils.feedgenerator import Atom1Feed, Rss201rev2Feed", "class GeoFeedMixin(object):\n \"\"\"\n This mixin provides the necessary routines for SyndicationFeed subclasses\n to produc...
""" Utilities for manipulating Geometry WKT. """ from django.utils import six def precision_wkt(geom, prec): """ Returns WKT text of the geometry according to the given precision (an integer or a string). If the precision is an integer, then the decimal places of coordinates WKT will be truncated to...
[ [ 8, 0, 0.0351, 0.0526, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0877, 0.0175, 0, 0.66, 0.5, 944, 0, 1, 0, 0, 944, 0, 0 ], [ 2, 0, 0.5614, 0.8947, 0, 0.66, ...
[ "\"\"\"\n Utilities for manipulating Geometry WKT.\n\"\"\"", "from django.utils import six", "def precision_wkt(geom, prec):\n \"\"\"\n Returns WKT text of the geometry according to the given precision (an\n integer or a string). If the precision is an integer, then the decimal\n places of coordina...
import warnings from django.contrib.gis import geoip HAS_GEOIP = geoip.HAS_GEOIP if HAS_GEOIP: BaseGeoIP = geoip.GeoIP GeoIPException = geoip.GeoIPException class GeoIP(BaseGeoIP): def __init__(self, *args, **kwargs): warnings.warn('GeoIP class has been moved to `django.contrib.gis.geo...
[ [ 1, 0, 0.0714, 0.0714, 0, 0.66, 0, 358, 0, 1, 0, 0, 358, 0, 0 ], [ 1, 0, 0.2143, 0.0714, 0, 0.66, 0.3333, 735, 0, 1, 0, 0, 735, 0, 0 ], [ 14, 0, 0.2857, 0.0714, 0, ...
[ "import warnings", "from django.contrib.gis import geoip", "HAS_GEOIP = geoip.HAS_GEOIP", "if HAS_GEOIP:\n BaseGeoIP = geoip.GeoIP\n GeoIPException = geoip.GeoIPException\n\n class GeoIP(BaseGeoIP):\n def __init__(self, *args, **kwargs):\n warnings.warn('GeoIP class has been moved t...
""" This module is for inspecting OGR data sources and generating either models for GeoDjango and/or mapping dictionaries for use with the `LayerMapping` utility. """ from django.utils.six.moves import zip # Requires GDAL to use. from django.contrib.gis.gdal import DataSource from django.contrib.gis.gdal.field import O...
[ [ 8, 0, 0.0134, 0.0223, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0268, 0.0045, 0, 0.66, 0.1429, 886, 0, 1, 0, 0, 886, 0, 0 ], [ 1, 0, 0.0357, 0.0045, 0, 0.66...
[ "\"\"\"\nThis module is for inspecting OGR data sources and generating either\nmodels for GeoDjango and/or mapping dictionaries for use with the\n`LayerMapping` utility.\n\"\"\"", "from django.utils.six.moves import zip", "from django.contrib.gis.gdal import DataSource", "from django.contrib.gis.gdal.field im...
""" This module includes some utility functions for inspecting the layout of a GDAL data source -- the functionality is analogous to the output produced by the `ogrinfo` utility. """ from django.contrib.gis.gdal import DataSource from django.contrib.gis.gdal.geometries import GEO_CLASSES def ogrinfo(data_source, num_...
[ [ 8, 0, 0.0566, 0.0943, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.1321, 0.0189, 0, 0.66, 0.25, 793, 0, 1, 0, 0, 793, 0, 0 ], [ 1, 0, 0.1509, 0.0189, 0, 0.66, ...
[ "\"\"\"\nThis module includes some utility functions for inspecting the layout\nof a GDAL data source -- the functionality is analogous to the output\nproduced by the `ogrinfo` utility.\n\"\"\"", "from django.contrib.gis.gdal import DataSource", "from django.contrib.gis.gdal.geometries import GEO_CLASSES", "d...
# LayerMapping -- A Django Model/OGR Layer Mapping Utility """ The LayerMapping class provides a way to map the contents of OGR vector files (e.g. SHP files) to Geographic-enabled Django models. For more information, please consult the GeoDjango documentation: http://geodjango.org/docs/layermapping.html """ impo...
[ [ 8, 0, 0.0083, 0.0116, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0149, 0.0017, 0, 0.66, 0.0588, 509, 0, 1, 0, 0, 509, 0, 0 ], [ 1, 0, 0.0166, 0.0017, 0, 0.66...
[ "\"\"\"\n The LayerMapping class provides a way to map the contents of OGR\n vector files (e.g. SHP files) to Geographic-enabled Django models.\n\n For more information, please consult the GeoDjango documentation:\n http://geodjango.org/docs/layermapping.html\n\"\"\"", "import sys", "from decimal import Decim...
""" This module contains useful utilities for GeoDjango. """ # Importing the utilities that depend on GDAL, if available. from django.contrib.gis.gdal import HAS_GDAL if HAS_GDAL: from django.contrib.gis.utils.ogrinfo import ogrinfo, sample from django.contrib.gis.utils.ogrinspect import mapping, ogrinspect ...
[ [ 8, 0, 0.08, 0.12, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.2, 0.04, 0, 0.66, 0.1667, 793, 0, 1, 0, 0, 793, 0, 0 ], [ 4, 0, 0.42, 0.4, 0, 0.66, 0.3333, ...
[ "\"\"\"\n This module contains useful utilities for GeoDjango.\n\"\"\"", "from django.contrib.gis.gdal import HAS_GDAL", "if HAS_GDAL:\n from django.contrib.gis.utils.ogrinfo import ogrinfo, sample\n from django.contrib.gis.utils.ogrinspect import mapping, ogrinspect\n from django.contrib.gis.utils.srs...
from django.contrib.gis.gdal import SpatialReference def add_srs_entry(srs, auth_name='EPSG', auth_srid=None, ref_sys_name=None, database=None): """ This function takes a GDAL SpatialReference system and adds its information to the `spatial_ref_sys` table of the spatial backend. Doing th...
[ [ 1, 0, 0.0125, 0.0125, 0, 0.66, 0, 793, 0, 1, 0, 0, 793, 0, 0 ], [ 2, 0, 0.5, 0.9375, 0, 0.66, 0.5, 461, 0, 5, 0, 0, 0, 0, 11 ], [ 8, 1, 0.2437, 0.375, 1, 0.79, ...
[ "from django.contrib.gis.gdal import SpatialReference", "def add_srs_entry(srs, auth_name='EPSG', auth_srid=None, ref_sys_name=None,\n database=None):\n \"\"\"\n This function takes a GDAL SpatialReference system and adds its information\n to the `spatial_ref_sys` table of the spatial ba...
from __future__ import absolute_import from django.contrib.gis.sitemaps import GeoRSSSitemap, KMLSitemap, KMZSitemap from .feeds import feed_dict from .models import City, Country sitemaps = {'kml' : KMLSitemap([City, Country]), 'kmz' : KMZSitemap([City, Country]), 'georss' : GeoRSSSitemap(f...
[ [ 1, 0, 0.0833, 0.0833, 0, 0.66, 0, 777, 0, 1, 0, 0, 777, 0, 0 ], [ 1, 0, 0.25, 0.0833, 0, 0.66, 0.25, 123, 0, 3, 0, 0, 123, 0, 0 ], [ 1, 0, 0.4167, 0.0833, 0, 0.66...
[ "from __future__ import absolute_import", "from django.contrib.gis.sitemaps import GeoRSSSitemap, KMLSitemap, KMZSitemap", "from .feeds import feed_dict", "from .models import City, Country", "sitemaps = {'kml' : KMLSitemap([City, Country]),\n 'kmz' : KMZSitemap([City, Country]),\n 'ge...
from django.contrib.gis.db import models from django.contrib.gis.tests.utils import mysql, spatialite from django.utils.encoding import python_2_unicode_compatible # MySQL spatial indices can't handle NULL geometries. null_flag = not mysql @python_2_unicode_compatible class Country(models.Model): name = models.Ch...
[ [ 1, 0, 0.0179, 0.0179, 0, 0.66, 0, 964, 0, 1, 0, 0, 964, 0, 0 ], [ 1, 0, 0.0357, 0.0179, 0, 0.66, 0.1, 185, 0, 2, 0, 0, 185, 0, 0 ], [ 1, 0, 0.0536, 0.0179, 0, 0.6...
[ "from django.contrib.gis.db import models", "from django.contrib.gis.tests.utils import mysql, spatialite", "from django.utils.encoding import python_2_unicode_compatible", "null_flag = not mysql", "class Country(models.Model):\n name = models.CharField(max_length=30)\n mpoly = models.MultiPolygonFiel...
from __future__ import absolute_import import re from django.db import connection from django.db.utils import DatabaseError from django.contrib.gis import gdal from django.contrib.gis.geos import (fromstr, GEOSGeometry, Point, LineString, LinearRing, Polygon, GeometryCollection) from django.contrib.gis.tests.util...
[ [ 1, 0, 0.0013, 0.0013, 0, 0.66, 0, 777, 0, 1, 0, 0, 777, 0, 0 ], [ 1, 0, 0.0039, 0.0013, 0, 0.66, 0.0625, 540, 0, 1, 0, 0, 540, 0, 0 ], [ 1, 0, 0.0065, 0.0013, 0, ...
[ "from __future__ import absolute_import", "import re", "from django.db import connection", "from django.db.utils import DatabaseError", "from django.contrib.gis import gdal", "from django.contrib.gis.geos import (fromstr, GEOSGeometry,\n Point, LineString, LinearRing, Polygon, GeometryCollection)", "...
from __future__ import absolute_import from django.contrib.gis import feeds from .models import City class TestGeoRSS1(feeds.Feed): link = '/city/' title = 'Test GeoDjango Cities' def items(self): return City.objects.all() def item_link(self, item): return '/city/%s/' % item.pk ...
[ [ 1, 0, 0.0152, 0.0152, 0, 0.66, 0, 777, 0, 1, 0, 0, 777, 0, 0 ], [ 1, 0, 0.0455, 0.0152, 0, 0.66, 0.1, 735, 0, 1, 0, 0, 735, 0, 0 ], [ 1, 0, 0.0758, 0.0152, 0, 0.6...
[ "from __future__ import absolute_import", "from django.contrib.gis import feeds", "from .models import City", "class TestGeoRSS1(feeds.Feed):\n link = '/city/'\n title = 'Test GeoDjango Cities'\n\n def items(self):\n return City.objects.all()\n\n def item_link(self, item):", " link = '...
from __future__ import absolute_import from django.conf.urls import patterns from .feeds import feed_dict from .sitemaps import sitemaps urlpatterns = patterns('', (r'^feeds/(?P<url>.*)/$', 'django.contrib.gis.views.feed', {'feed_dict': feed_dict}), ) urlpatterns += patterns('django.contrib.gis.sitemaps.views'...
[ [ 1, 0, 0.0556, 0.0556, 0, 0.66, 0, 777, 0, 1, 0, 0, 777, 0, 0 ], [ 1, 0, 0.1667, 0.0556, 0, 0.66, 0.25, 528, 0, 1, 0, 0, 528, 0, 0 ], [ 1, 0, 0.2778, 0.0556, 0, 0....
[ "from __future__ import absolute_import", "from django.conf.urls import patterns", "from .feeds import feed_dict", "from .sitemaps import sitemaps", "urlpatterns = patterns('',\n (r'^feeds/(?P<url>.*)/$', 'django.contrib.gis.views.feed', {'feed_dict': feed_dict}),\n)" ]
from django.contrib.gis.db import models from django.utils.encoding import python_2_unicode_compatible @python_2_unicode_compatible class City3D(models.Model): name = models.CharField(max_length=30) point = models.PointField(dim=3) objects = models.GeoManager() def __str__(self): return self.n...
[ [ 1, 0, 0.013, 0.013, 0, 0.66, 0, 964, 0, 1, 0, 0, 964, 0, 0 ], [ 1, 0, 0.026, 0.013, 0, 0.66, 0.0909, 96, 0, 1, 0, 0, 96, 0, 0 ], [ 3, 0, 0.1039, 0.0909, 0, 0.66, ...
[ "from django.contrib.gis.db import models", "from django.utils.encoding import python_2_unicode_compatible", "class City3D(models.Model):\n name = models.CharField(max_length=30)\n point = models.PointField(dim=3)\n objects = models.GeoManager()\n\n def __str__(self):\n return self.name", "...
from __future__ import absolute_import, unicode_literals import os import re from django.contrib.gis.db.models import Union, Extent3D from django.contrib.gis.geos import GEOSGeometry, LineString, Point, Polygon from django.contrib.gis.utils import LayerMapping, LayerMapError from django.test import TestCase from djan...
[ [ 1, 0, 0.0037, 0.0037, 0, 0.66, 0, 777, 0, 2, 0, 0, 777, 0, 0 ], [ 1, 0, 0.0112, 0.0037, 0, 0.66, 0.0625, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 1, 0, 0.0149, 0.0037, 0, ...
[ "from __future__ import absolute_import, unicode_literals", "import os", "import re", "from django.contrib.gis.db.models import Union, Extent3D", "from django.contrib.gis.geos import GEOSGeometry, LineString, Point, Polygon", "from django.contrib.gis.utils import LayerMapping, LayerMapError", "from djan...
# Create your views here.
[]
[]
from django.contrib.gis.db import models from django.utils.encoding import python_2_unicode_compatible @python_2_unicode_compatible class SouthTexasCity(models.Model): "City model on projected coordinate system for South Texas." name = models.CharField(max_length=30) point = models.PointField(srid=32140) ...
[ [ 1, 0, 0.0172, 0.0172, 0, 0.66, 0, 964, 0, 1, 0, 0, 964, 0, 0 ], [ 1, 0, 0.0345, 0.0172, 0, 0.66, 0.125, 96, 0, 1, 0, 0, 96, 0, 0 ], [ 3, 0, 0.1293, 0.1034, 0, 0.6...
[ "from django.contrib.gis.db import models", "from django.utils.encoding import python_2_unicode_compatible", "class SouthTexasCity(models.Model):\n \"City model on projected coordinate system for South Texas.\"\n name = models.CharField(max_length=30)\n point = models.PointField(srid=32140)\n object...
from __future__ import absolute_import from django.db import connection from django.db.models import Q from django.contrib.gis.geos import GEOSGeometry, LineString from django.contrib.gis.measure import D # alias for Distance from django.contrib.gis.tests.utils import oracle, postgis, spatialite, no_oracle, no_spatial...
[ [ 1, 0, 0.0028, 0.0028, 0, 0.66, 0, 777, 0, 1, 0, 0, 777, 0, 0 ], [ 1, 0, 0.0084, 0.0028, 0, 0.66, 0.125, 40, 0, 1, 0, 0, 40, 0, 0 ], [ 1, 0, 0.0112, 0.0028, 0, 0.6...
[ "from __future__ import absolute_import", "from django.db import connection", "from django.db.models import Q", "from django.contrib.gis.geos import GEOSGeometry, LineString", "from django.contrib.gis.measure import D # alias for Distance", "from django.contrib.gis.tests.utils import oracle, postgis, spat...
from django.contrib.gis.db import models from django.utils.encoding import python_2_unicode_compatible @python_2_unicode_compatible class City(models.Model): name = models.CharField(max_length=30) point = models.PointField(geography=True) objects = models.GeoManager() def __str__(self): return self.nam...
[ [ 1, 0, 0.0417, 0.0417, 0, 0.66, 0, 964, 0, 1, 0, 0, 964, 0, 0 ], [ 1, 0, 0.0833, 0.0417, 0, 0.66, 0.25, 96, 0, 1, 0, 0, 96, 0, 0 ], [ 3, 0, 0.2917, 0.2083, 0, 0.66...
[ "from django.contrib.gis.db import models", "from django.utils.encoding import python_2_unicode_compatible", "class City(models.Model):\n name = models.CharField(max_length=30)\n point = models.PointField(geography=True)\n objects = models.GeoManager()\n def __str__(self): return self.name", " ...
""" Tests for geography support in PostGIS 1.5+ """ from __future__ import absolute_import import os from django.contrib.gis import gdal from django.contrib.gis.measure import D from django.test import TestCase from django.utils._os import upath from .models import City, County, Zipcode class GeographyTest(TestCas...
[ [ 8, 0, 0.0217, 0.0326, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0435, 0.0109, 0, 0.66, 0.125, 777, 0, 1, 0, 0, 777, 0, 0 ], [ 1, 0, 0.0652, 0.0109, 0, 0.66,...
[ "\"\"\"\nTests for geography support in PostGIS 1.5+\n\"\"\"", "from __future__ import absolute_import", "import os", "from django.contrib.gis import gdal", "from django.contrib.gis.measure import D", "from django.test import TestCase", "from django.utils._os import upath", "from .models import City, ...
from django.contrib.gis.db import models class State(models.Model): name = models.CharField(max_length=20) objects = models.GeoManager() class County(models.Model): name = models.CharField(max_length=25) state = models.ForeignKey(State) mpoly = models.MultiPolygonField(srid=4269) # Multipolygon in...
[ [ 1, 0, 0.0143, 0.0143, 0, 0.66, 0, 964, 0, 1, 0, 0, 964, 0, 0 ], [ 3, 0, 0.0571, 0.0429, 0, 0.66, 0.0769, 110, 0, 0, 0, 0, 996, 0, 2 ], [ 14, 1, 0.0571, 0.0143, 1, ...
[ "from django.contrib.gis.db import models", "class State(models.Model):\n name = models.CharField(max_length=20)\n objects = models.GeoManager()", " name = models.CharField(max_length=20)", " objects = models.GeoManager()", "class County(models.Model):\n name = models.CharField(max_length=25)...
# coding: utf-8 from __future__ import absolute_import, unicode_literals import os from copy import copy from decimal import Decimal from django.contrib.gis.gdal import DataSource from django.contrib.gis.tests.utils import mysql from django.contrib.gis.utils.layermapping import (LayerMapping, LayerMapError, Inval...
[ [ 1, 0, 0.0062, 0.0031, 0, 0.66, 0, 777, 0, 2, 0, 0, 777, 0, 0 ], [ 1, 0, 0.0123, 0.0031, 0, 0.66, 0.0435, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 1, 0, 0.0154, 0.0031, 0, ...
[ "from __future__ import absolute_import, unicode_literals", "import os", "from copy import copy", "from decimal import Decimal", "from django.contrib.gis.gdal import DataSource", "from django.contrib.gis.tests.utils import mysql", "from django.contrib.gis.utils.layermapping import (LayerMapping, LayerMa...
from django.contrib.gis.db import models from django.contrib.localflavor.us.models import USStateField from django.utils.encoding import python_2_unicode_compatible @python_2_unicode_compatible class Location(models.Model): point = models.PointField() objects = models.GeoManager() def __str__(self): return...
[ [ 1, 0, 0.0185, 0.0185, 0, 0.66, 0, 964, 0, 1, 0, 0, 964, 0, 0 ], [ 1, 0, 0.037, 0.0185, 0, 0.66, 0.1, 676, 0, 1, 0, 0, 676, 0, 0 ], [ 1, 0, 0.0556, 0.0185, 0, 0.66...
[ "from django.contrib.gis.db import models", "from django.contrib.localflavor.us.models import USStateField", "from django.utils.encoding import python_2_unicode_compatible", "class Location(models.Model):\n point = models.PointField()\n objects = models.GeoManager()\n def __str__(self): return self.p...
from __future__ import absolute_import from datetime import date from django.contrib.gis.geos import GEOSGeometry, Point, MultiPoint from django.contrib.gis.db.models import Collect, Count, Extent, F, Union from django.contrib.gis.geometry.backend import Geometry from django.contrib.gis.tests.utils import mysql, orac...
[ [ 1, 0, 0.0033, 0.0033, 0, 0.66, 0, 777, 0, 1, 0, 0, 777, 0, 0 ], [ 1, 0, 0.0099, 0.0033, 0, 0.66, 0.125, 426, 0, 1, 0, 0, 426, 0, 0 ], [ 1, 0, 0.0166, 0.0033, 0, 0...
[ "from __future__ import absolute_import", "from datetime import date", "from django.contrib.gis.geos import GEOSGeometry, Point, MultiPoint", "from django.contrib.gis.db.models import Collect, Count, Extent, F, Union", "from django.contrib.gis.geometry.backend import Geometry", "from django.contrib.gis.te...
from django.conf import settings from django.db import DEFAULT_DB_ALIAS # function that will pass a test. def pass_test(*args): return def no_backend(test_func, backend): "Use this decorator to disable test on specified backend." if settings.DATABASES[DEFAULT_DB_ALIAS]['ENGINE'].rsplit('.')[-1] == backend: ...
[ [ 1, 0, 0.027, 0.027, 0, 0.66, 0, 128, 0, 1, 0, 0, 128, 0, 0 ], [ 1, 0, 0.0541, 0.027, 0, 0.66, 0.0714, 40, 0, 1, 0, 0, 40, 0, 0 ], [ 2, 0, 0.1351, 0.027, 0, 0.66, ...
[ "from django.conf import settings", "from django.db import DEFAULT_DB_ALIAS", "def pass_test(*args): return", "def pass_test(*args): return", "def no_backend(test_func, backend):\n \"Use this decorator to disable test on specified backend.\"\n if settings.DATABASES[DEFAULT_DB_ALIAS]['ENGINE'].rsplit('...
from django.contrib.gis.db import models class AllOGRFields(models.Model): f_decimal = models.FloatField() f_float = models.FloatField() f_int = models.IntegerField() f_char = models.CharField(max_length=10) f_date = models.DateField() f_datetime = models.DateTimeField() f_time = models.Tim...
[ [ 1, 0, 0.0769, 0.0769, 0, 0.66, 0, 964, 0, 1, 0, 0, 964, 0, 0 ], [ 3, 0, 0.6154, 0.8462, 0, 0.66, 1, 128, 0, 0, 0, 0, 996, 0, 9 ], [ 14, 1, 0.3077, 0.0769, 1, 0.63...
[ "from django.contrib.gis.db import models", "class AllOGRFields(models.Model):\n f_decimal = models.FloatField()\n f_float = models.FloatField()\n f_int = models.IntegerField()\n f_char = models.CharField(max_length=10)\n f_date = models.DateField()\n f_datetime = models.DateTimeField()\n f_t...
from __future__ import absolute_import import os from django.db import connections from django.test import TestCase from django.contrib.gis.gdal import Driver from django.contrib.gis.geometry.test_data import TEST_DATA from django.contrib.gis.utils.ogrinspect import ogrinspect from .models import AllOGRFields clas...
[ [ 1, 0, 0.0077, 0.0077, 0, 0.66, 0, 777, 0, 1, 0, 0, 777, 0, 0 ], [ 1, 0, 0.0231, 0.0077, 0, 0.66, 0.1111, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 1, 0, 0.0385, 0.0077, 0, ...
[ "from __future__ import absolute_import", "import os", "from django.db import connections", "from django.test import TestCase", "from django.contrib.gis.gdal import Driver", "from django.contrib.gis.geometry.test_data import TEST_DATA", "from django.contrib.gis.utils.ogrinspect import ogrinspect", "fr...
from django.contrib.gis.db import models from django.contrib.gis import admin from django.utils.encoding import python_2_unicode_compatible @python_2_unicode_compatible class City(models.Model): name = models.CharField(max_length=30) point = models.PointField() objects = models.GeoManager() def __str__...
[ [ 1, 0, 0.0833, 0.0833, 0, 0.66, 0, 964, 0, 1, 0, 0, 964, 0, 0 ], [ 1, 0, 0.1667, 0.0833, 0, 0.66, 0.25, 735, 0, 1, 0, 0, 735, 0, 0 ], [ 1, 0, 0.25, 0.0833, 0, 0.66...
[ "from django.contrib.gis.db import models", "from django.contrib.gis import admin", "from django.utils.encoding import python_2_unicode_compatible", "class City(models.Model):\n name = models.CharField(max_length=30)\n point = models.PointField()\n objects = models.GeoManager()\n def __str__(self)...
from __future__ import absolute_import from django.contrib.gis import admin from django.contrib.gis.geos import GEOSGeometry, Point from django.test import TestCase from django.test.utils import override_settings from .models import City GOOGLE_MAPS_API_KEY = 'XXXX' class GeoAdminTest(TestCase): urls = 'django...
[ [ 1, 0, 0.0143, 0.0143, 0, 0.66, 0, 777, 0, 1, 0, 0, 777, 0, 0 ], [ 1, 0, 0.0429, 0.0143, 0, 0.66, 0.1429, 735, 0, 1, 0, 0, 735, 0, 0 ], [ 1, 0, 0.0571, 0.0143, 0, ...
[ "from __future__ import absolute_import", "from django.contrib.gis import admin", "from django.contrib.gis.geos import GEOSGeometry, Point", "from django.test import TestCase", "from django.test.utils import override_settings", "from .models import City", "GOOGLE_MAPS_API_KEY = 'XXXX'", "class GeoAdmi...
from django.conf.urls import patterns, include from django.contrib import admin urlpatterns = patterns('', (r'^admin/', include(admin.site.urls)), )
[ [ 1, 0, 0.1667, 0.1667, 0, 0.66, 0, 528, 0, 2, 0, 0, 528, 0, 0 ], [ 1, 0, 0.3333, 0.1667, 0, 0.66, 0.5, 302, 0, 1, 0, 0, 302, 0, 0 ], [ 14, 0, 0.8333, 0.5, 0, 0.66,...
[ "from django.conf.urls import patterns, include", "from django.contrib import admin", "urlpatterns = patterns('',\n (r'^admin/', include(admin.site.urls)),\n)" ]
from django.conf import settings from django.test.simple import build_suite, DjangoTestSuiteRunner from django.utils import unittest from .test_geoforms import GeometryFieldTest from .test_measure import DistanceTest, AreaTest from .test_spatialrefsys import SpatialRefSysTest def geo_apps(namespace=True, runtests=Fa...
[ [ 1, 0, 0.0081, 0.0081, 0, 0.66, 0, 128, 0, 1, 0, 0, 128, 0, 0 ], [ 1, 0, 0.0163, 0.0081, 0, 0.66, 0.125, 655, 0, 2, 0, 0, 655, 0, 0 ], [ 1, 0, 0.0244, 0.0081, 0, 0...
[ "from django.conf import settings", "from django.test.simple import build_suite, DjangoTestSuiteRunner", "from django.utils import unittest", "from .test_geoforms import GeometryFieldTest", "from .test_measure import DistanceTest, AreaTest", "from .test_spatialrefsys import SpatialRefSysTest", "def geo_...
# Copyright (c) 2007, Robert Coup <robert.coup@onetrackmind.co.nz> # All rights reserved. # # Redistribution and use in source and binary forms, with or without modification, # are permitted provided that the following conditions are met: # # 1. Redistributions of source code must retain the above copyright notice, #...
[ [ 8, 0, 0.1, 0.0273, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.1152, 0.003, 0, 0.66, 0.0833, 272, 0, 0, 0, 0, 0, 5, 0 ], [ 1, 0, 0.1182, 0.003, 0, 0.66, ...
[ "\"\"\"\nDistance and Area objects to allow for sensible and convienient calculation\nand conversions.\n\nAuthors: Robert Coup, Justin Bronn, Riccardo Di Virgilio\n\nInspired by GeoPy (http://exogen.case.edu/projects/geopy/)\nand Geoff Biggs' PhD work on dimensioned units for robotics.", "__all__ = ['A', 'Area', ...
# -*- coding: utf-8 -*- from __future__ import unicode_literals import os from django.conf import settings from django.contrib.gis.geos import GEOSGeometry from django.contrib.gis.geoip import GeoIP, GeoIPException from django.utils import unittest from django.utils import six # Note: Requires use of both the GeoIP ...
[ [ 1, 0, 0.0164, 0.0082, 0, 0.66, 0, 777, 0, 1, 0, 0, 777, 0, 0 ], [ 1, 0, 0.0328, 0.0082, 0, 0.66, 0.1111, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 1, 0, 0.041, 0.0082, 0, 0...
[ "from __future__ import unicode_literals", "import os", "from django.conf import settings", "from django.contrib.gis.geos import GEOSGeometry", "from django.contrib.gis.geoip import GeoIP, GeoIPException", "from django.utils import unittest", "from django.utils import six", "class GeoIPTest(unittest.T...
import os import re from ctypes import c_char_p from django.core.validators import ipv4_re from django.contrib.gis.geoip.libgeoip import GEOIP_SETTINGS from django.contrib.gis.geoip.prototypes import ( GeoIPRecord, GeoIPTag, GeoIP_open, GeoIP_delete, GeoIP_database_info, GeoIP_lib_version, GeoIP_record_by_addr...
[ [ 1, 0, 0.0038, 0.0038, 0, 0.66, 0, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 1, 0, 0.0075, 0.0038, 0, 0.66, 0.1, 540, 0, 1, 0, 0, 540, 0, 0 ], [ 1, 0, 0.0113, 0.0038, 0, 0.6...
[ "import os", "import re", "from ctypes import c_char_p", "from django.core.validators import ipv4_re", "from django.contrib.gis.geoip.libgeoip import GEOIP_SETTINGS", "from django.contrib.gis.geoip.prototypes import (\n GeoIPRecord, GeoIPTag, GeoIP_open, GeoIP_delete, GeoIP_database_info,\n GeoIP_li...
""" This module houses the GeoIP object, a ctypes wrapper for the MaxMind GeoIP(R) C API (http://www.maxmind.com/app/c). This is an alternative to the GPL licensed Python GeoIP interface provided by MaxMind. GeoIP(R) is a registered trademark of MaxMind, LLC of Boston, Massachusetts. For IP-based geolocation, t...
[ [ 8, 0, 0.35, 0.65, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.7, 0.05, 0, 0.66, 0.5, 777, 0, 1, 0, 0, 777, 0, 0 ], [ 7, 0, 0.9, 0.25, 0, 0.66, 1, 0, ...
[ "\"\"\"\n This module houses the GeoIP object, a ctypes wrapper for the MaxMind GeoIP(R)\n C API (http://www.maxmind.com/app/c). This is an alternative to the GPL\n licensed Python GeoIP interface provided by MaxMind.\n\n GeoIP(R) is a registered trademark of MaxMind, LLC of Boston, Massachusetts.\n\n For IP-based...
import os from ctypes import CDLL from ctypes.util import find_library from django.conf import settings # Creating the settings dictionary with any settings, if needed. GEOIP_SETTINGS = dict((key, getattr(settings, key)) for key in ('GEOIP_PATH', 'GEOIP_LIBRARY_PATH', 'GEOIP_COUNTRY', 'GEOIP_CITY...
[ [ 1, 0, 0.0323, 0.0323, 0, 0.66, 0, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 1, 0, 0.0645, 0.0323, 0, 0.66, 0.0909, 182, 0, 1, 0, 0, 182, 0, 0 ], [ 1, 0, 0.0968, 0.0323, 0, ...
[ "import os", "from ctypes import CDLL", "from ctypes.util import find_library", "from django.conf import settings", "GEOIP_SETTINGS = dict((key, getattr(settings, key))\n for key in ('GEOIP_PATH', 'GEOIP_LIBRARY_PATH', 'GEOIP_COUNTRY', 'GEOIP_CITY')\n if hasattr(set...
from ctypes import c_char_p, c_float, c_int, string_at, Structure, POINTER from django.contrib.gis.geoip.libgeoip import lgeoip, free #### GeoIP C Structure definitions #### class GeoIPRecord(Structure): _fields_ = [('country_code', c_char_p), ('country_code3', c_char_p), ('country...
[ [ 1, 0, 0.0092, 0.0092, 0, 0.66, 0, 182, 0, 6, 0, 0, 182, 0, 0 ], [ 1, 0, 0.0183, 0.0092, 0, 0.66, 0.0333, 127, 0, 2, 0, 0, 127, 0, 0 ], [ 3, 0, 0.133, 0.1651, 0, 0...
[ "from ctypes import c_char_p, c_float, c_int, string_at, Structure, POINTER", "from django.contrib.gis.geoip.libgeoip import lgeoip, free", "class GeoIPRecord(Structure):\n _fields_ = [('country_code', c_char_p),\n ('country_code3', c_char_p),\n ('country_name', c_char_p),\n ...
""" DataSource is a wrapper for the OGR Data Source object, which provides an interface for reading vector geometry data from many different file formats (including ESRI shapefiles). When instantiating a DataSource object, use the filename of a GDAL-supported data source. For example, a SHP file or a TIGER/Line...
[ [ 8, 0, 0.1333, 0.2593, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.2741, 0.0074, 0, 0.66, 0.1, 182, 0, 1, 0, 0, 182, 0, 0 ], [ 1, 0, 0.2963, 0.0074, 0, 0.66, ...
[ "\"\"\"\n DataSource is a wrapper for the OGR Data Source object, which provides\n an interface for reading vector geometry data from many different file\n formats (including ESRI shapefiles).\n\n When instantiating a DataSource object, use the filename of a\n GDAL-supported data source. For example, a SHP file or...
""" This module houses the OGR & SRS Exception objects, and the check_err() routine which checks the status code returned by OGR methods. """ #### OGR & SRS Exceptions #### class GDALException(Exception): pass class OGRException(Exception): pass class SRSException(Exception): pass class OGRIndexError(OGRException, K...
[ [ 8, 0, 0.0714, 0.119, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 3, 0, 0.1667, 0.0238, 0, 0.66, 0.1429, 355, 0, 0, 0, 0, 645, 0, 0 ], [ 3, 0, 0.1905, 0.0238, 0, 0.66,...
[ "\"\"\"\n This module houses the OGR & SRS Exception objects, and the\n check_err() routine which checks the status code returned by\n OGR methods.\n\"\"\"", "class GDALException(Exception): pass", "class OGRException(Exception): pass", "class SRSException(Exception): pass", "class OGRIndexError(OGRExceptio...
from ctypes import byref, c_int from datetime import date, datetime, time from django.contrib.gis.gdal.base import GDALBase from django.contrib.gis.gdal.error import OGRException from django.contrib.gis.gdal.prototypes import ds as capi from django.utils.encoding import force_text # For more information, see the OGR ...
[ [ 1, 0, 0.0052, 0.0052, 0, 0.66, 0, 182, 0, 2, 0, 0, 182, 0, 0 ], [ 1, 0, 0.0103, 0.0052, 0, 0.66, 0.05, 426, 0, 3, 0, 0, 426, 0, 0 ], [ 1, 0, 0.0155, 0.0052, 0, 0....
[ "from ctypes import byref, c_int", "from datetime import date, datetime, time", "from django.contrib.gis.gdal.base import GDALBase", "from django.contrib.gis.gdal.error import OGRException", "from django.contrib.gis.gdal.prototypes import ds as capi", "from django.utils.encoding import force_text", "cla...
# Needed ctypes routines from ctypes import c_double, byref # Other GDAL imports. from django.contrib.gis.gdal.base import GDALBase from django.contrib.gis.gdal.envelope import Envelope, OGREnvelope from django.contrib.gis.gdal.error import OGRException, OGRIndexError, SRSException from django.contrib.gis.gdal.feature...
[ [ 1, 0, 0.0092, 0.0046, 0, 0.66, 0, 182, 0, 2, 0, 0, 182, 0, 0 ], [ 1, 0, 0.0229, 0.0046, 0, 0.66, 0.0769, 771, 0, 1, 0, 0, 771, 0, 0 ], [ 1, 0, 0.0275, 0.0046, 0, ...
[ "from ctypes import c_double, byref", "from django.contrib.gis.gdal.base import GDALBase", "from django.contrib.gis.gdal.envelope import Envelope, OGREnvelope", "from django.contrib.gis.gdal.error import OGRException, OGRIndexError, SRSException", "from django.contrib.gis.gdal.feature import Feature", "fr...
from ctypes import c_char_p, c_double, c_int, c_void_p, POINTER from django.contrib.gis.gdal.envelope import OGREnvelope from django.contrib.gis.gdal.libgdal import lgdal from django.contrib.gis.gdal.prototypes.errcheck import check_bool, check_envelope from django.contrib.gis.gdal.prototypes.generation import (const_s...
[ [ 1, 0, 0.0102, 0.0102, 0, 0.66, 0, 182, 0, 5, 0, 0, 182, 0, 0 ], [ 1, 0, 0.0204, 0.0102, 0, 0.66, 0.0182, 796, 0, 1, 0, 0, 796, 0, 0 ], [ 1, 0, 0.0306, 0.0102, 0, ...
[ "from ctypes import c_char_p, c_double, c_int, c_void_p, POINTER", "from django.contrib.gis.gdal.envelope import OGREnvelope", "from django.contrib.gis.gdal.libgdal import lgdal", "from django.contrib.gis.gdal.prototypes.errcheck import check_bool, check_envelope", "from django.contrib.gis.gdal.prototypes.g...
""" This module houses the error-checking routines used by the GDAL ctypes prototypes. """ from ctypes import c_void_p, string_at from django.contrib.gis.gdal.error import check_err, OGRException, SRSException from django.contrib.gis.gdal.libgdal import lgdal from django.utils import six # Helper routines for retrie...
[ [ 8, 0, 0.0195, 0.0312, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0391, 0.0078, 0, 0.66, 0.0588, 182, 0, 2, 0, 0, 182, 0, 0 ], [ 1, 0, 0.0469, 0.0078, 0, 0.66...
[ "\"\"\"\n This module houses the error-checking routines used by the GDAL\n ctypes prototypes.\n\"\"\"", "from ctypes import c_void_p, string_at", "from django.contrib.gis.gdal.error import check_err, OGRException, SRSException", "from django.contrib.gis.gdal.libgdal import lgdal", "from django.utils import...
""" This module houses the ctypes function prototypes for OGR DataSource related data structures. OGR_Dr_*, OGR_DS_*, OGR_L_*, OGR_F_*, OGR_Fld_* routines are relevant here. """ from ctypes import c_char_p, c_double, c_int, c_long, c_void_p, POINTER from django.contrib.gis.gdal.envelope import OGREnvelope from djan...
[ [ 8, 0, 0.0429, 0.0714, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0857, 0.0143, 0, 0.66, 0.0196, 182, 0, 6, 0, 0, 182, 0, 0 ], [ 1, 0, 0.1, 0.0143, 0, 0.66, ...
[ "\"\"\"\n This module houses the ctypes function prototypes for OGR DataSource\n related data structures. OGR_Dr_*, OGR_DS_*, OGR_L_*, OGR_F_*, \n OGR_Fld_* routines are relevant here.\n\"\"\"", "from ctypes import c_char_p, c_double, c_int, c_long, c_void_p, POINTER", "from django.contrib.gis.gdal.envelope imp...
""" This module contains functions that generate ctypes prototypes for the GDAL routines. """ from ctypes import c_char_p, c_double, c_int, c_void_p from django.contrib.gis.gdal.prototypes.errcheck import ( check_arg_errcode, check_errcode, check_geom, check_geom_offset, check_pointer, check_srs, check_str_a...
[ [ 8, 0, 0.02, 0.032, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.048, 0.008, 0, 0.66, 0.0909, 182, 0, 4, 0, 0, 182, 0, 0 ], [ 1, 0, 0.064, 0.024, 0, 0.66, 0...
[ "\"\"\"\n This module contains functions that generate ctypes prototypes for the\n GDAL routines.\n\"\"\"", "from ctypes import c_char_p, c_double, c_int, c_void_p", "from django.contrib.gis.gdal.prototypes.errcheck import (\n check_arg_errcode, check_errcode, check_geom, check_geom_offset,\n check_pointe...
from ctypes import c_char_p, c_int, c_void_p, POINTER from django.contrib.gis.gdal.libgdal import lgdal, std_call from django.contrib.gis.gdal.prototypes.generation import (const_string_output, double_output, int_output, srs_output, string_output, void_output) ## Shortcut generation for routines with known paramet...
[ [ 1, 0, 0.0141, 0.0141, 0, 0.66, 0, 182, 0, 4, 0, 0, 182, 0, 0 ], [ 1, 0, 0.0282, 0.0141, 0, 0.66, 0.0294, 460, 0, 2, 0, 0, 460, 0, 0 ], [ 1, 0, 0.0493, 0.0282, 0, ...
[ "from ctypes import c_char_p, c_int, c_void_p, POINTER", "from django.contrib.gis.gdal.libgdal import lgdal, std_call", "from django.contrib.gis.gdal.prototypes.generation import (const_string_output,\n double_output, int_output, srs_output, string_output, void_output)", "def srs_double(f):\n \"\"\"\n ...
from django.contrib.gis.gdal.error import OGRException from django.utils import six #### OGRGeomType #### class OGRGeomType(object): "Encapulates OGR Geometry Types." wkb25bit = -2147483648 # Dictionary of acceptable OGRwkbGeometryType s and their string names. _types = {0 : 'Unknown', ...
[ [ 1, 0, 0.0115, 0.0115, 0, 0.66, 0, 76, 0, 1, 0, 0, 76, 0, 0 ], [ 1, 0, 0.0345, 0.0115, 0, 0.66, 0.5, 944, 0, 1, 0, 0, 944, 0, 0 ], [ 3, 0, 0.5345, 0.9425, 0, 0.66,...
[ "from django.contrib.gis.gdal.error import OGRException", "from django.utils import six", "class OGRGeomType(object):\n \"Encapulates OGR Geometry Types.\"\n\n wkb25bit = -2147483648\n\n # Dictionary of acceptable OGRwkbGeometryType s and their string names.\n _types = {0 : 'Unknown',\n ...
""" Module for executing all of the GDAL tests. None of these tests require the use of the database. """ from __future__ import absolute_import from django.utils.unittest import TestSuite, TextTestRunner # Importing the GDAL test modules. from . import test_driver, test_ds, test_envelope, test_geom, test_srs test_s...
[ [ 8, 0, 0.0893, 0.1429, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.1786, 0.0357, 0, 0.66, 0.1667, 777, 0, 1, 0, 0, 777, 0, 0 ], [ 1, 0, 0.25, 0.0357, 0, 0.66, ...
[ "\"\"\"\nModule for executing all of the GDAL tests. None\nof these tests require the use of the database.\n\"\"\"", "from __future__ import absolute_import", "from django.utils.unittest import TestSuite, TextTestRunner", "from . import test_driver, test_ds, test_envelope, test_geom, test_srs", "test_suite...
# The GDAL C library, OGR exception, and the Field object from django.contrib.gis.gdal.base import GDALBase from django.contrib.gis.gdal.error import OGRException, OGRIndexError from django.contrib.gis.gdal.field import Field from django.contrib.gis.gdal.geometries import OGRGeometry, OGRGeomType # ctypes function pro...
[ [ 1, 0, 0.0161, 0.0081, 0, 0.66, 0, 771, 0, 1, 0, 0, 771, 0, 0 ], [ 1, 0, 0.0242, 0.0081, 0, 0.66, 0.125, 76, 0, 2, 0, 0, 76, 0, 0 ], [ 1, 0, 0.0323, 0.0081, 0, 0.6...
[ "from django.contrib.gis.gdal.base import GDALBase", "from django.contrib.gis.gdal.error import OGRException, OGRIndexError", "from django.contrib.gis.gdal.field import Field", "from django.contrib.gis.gdal.geometries import OGRGeometry, OGRGeomType", "from django.contrib.gis.gdal.prototypes import ds as ca...
""" The OGRGeometry is a wrapper for using the OGR Geometry class (see http://www.gdal.org/ogr/classOGRGeometry.html). OGRGeometry may be instantiated when reading geometries from OGR Data Sources (e.g. SHP files), or when given OGC WKT (a string). While the 'full' API is not present yet, the API is "pythonic" u...
[ [ 8, 0, 0.0282, 0.0551, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0579, 0.0014, 0, 0.66, 0.0417, 509, 0, 1, 0, 0, 509, 0, 0 ], [ 1, 0, 0.0592, 0.0014, 0, 0.66...
[ "\"\"\"\n The OGRGeometry is a wrapper for using the OGR Geometry class\n (see http://www.gdal.org/ogr/classOGRGeometry.html). OGRGeometry\n may be instantiated when reading geometries from OGR Data Sources\n (e.g. SHP files), or when given OGC WKT (a string).\n\n While the 'full' API is not present yet, the API i...
from __future__ import unicode_literals import logging import os import re from ctypes import c_char_p, c_int, CDLL, CFUNCTYPE from ctypes.util import find_library from django.contrib.gis.gdal.error import OGRException from django.core.exceptions import ImproperlyConfigured logger = logging.getLogger('django.contrib...
[ [ 1, 0, 0.0092, 0.0092, 0, 0.66, 0, 777, 0, 1, 0, 0, 777, 0, 0 ], [ 1, 0, 0.0275, 0.0092, 0, 0.66, 0.0303, 715, 0, 1, 0, 0, 715, 0, 0 ], [ 1, 0, 0.0367, 0.0092, 0, ...
[ "from __future__ import unicode_literals", "import logging", "import os", "import re", "from ctypes import c_char_p, c_int, CDLL, CFUNCTYPE", "from ctypes.util import find_library", "from django.contrib.gis.gdal.error import OGRException", "from django.core.exceptions import ImproperlyConfigured", "...
# prerequisites imports from ctypes import c_void_p from django.contrib.gis.gdal.base import GDALBase from django.contrib.gis.gdal.error import OGRException from django.contrib.gis.gdal.prototypes import ds as capi from django.utils import six from django.utils.encoding import force_bytes # For more information, see ...
[ [ 1, 0, 0.0294, 0.0147, 0, 0.66, 0, 182, 0, 1, 0, 0, 182, 0, 0 ], [ 1, 0, 0.0441, 0.0147, 0, 0.66, 0.1667, 771, 0, 1, 0, 0, 771, 0, 0 ], [ 1, 0, 0.0588, 0.0147, 0, ...
[ "from ctypes import c_void_p", "from django.contrib.gis.gdal.base import GDALBase", "from django.contrib.gis.gdal.error import OGRException", "from django.contrib.gis.gdal.prototypes import ds as capi", "from django.utils import six", "from django.utils.encoding import force_bytes", "class Driver(GDALBa...
""" The GDAL/OGR library uses an Envelope structure to hold the bounding box information for a geometry. The envelope (bounding box) contains two pairs of coordinates, one for the lower left coordinate and one for the upper right coordinate: +----------o Upper right; (max_x, max_y) ...
[ [ 8, 0, 0.0371, 0.0686, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0743, 0.0057, 0, 0.66, 0.25, 182, 0, 2, 0, 0, 182, 0, 0 ], [ 1, 0, 0.08, 0.0057, 0, 0.66, ...
[ "\"\"\"\n The GDAL/OGR library uses an Envelope structure to hold the bounding\n box information for a geometry. The envelope (bounding box) contains\n two pairs of coordinates, one for the lower left coordinate and one\n for the upper right coordinate:\n\n +----------o Upper right; (max_...
from ctypes import c_void_p from django.contrib.gis.gdal.error import GDALException from django.utils import six class GDALBase(object): """ Base object for GDAL objects that has a pointer access property that controls access to the underlying C pointer. """ # Initially the pointer is NULL. _p...
[ [ 1, 0, 0.0278, 0.0278, 0, 0.66, 0, 182, 0, 1, 0, 0, 182, 0, 0 ], [ 1, 0, 0.0833, 0.0278, 0, 0.66, 0.3333, 76, 0, 1, 0, 0, 76, 0, 0 ], [ 1, 0, 0.1111, 0.0278, 0, 0....
[ "from ctypes import c_void_p", "from django.contrib.gis.gdal.error import GDALException", "from django.utils import six", "class GDALBase(object):\n \"\"\"\n Base object for GDAL objects that has a pointer access property\n that controls access to the underlying C pointer.\n \"\"\"\n # Initiall...
""" This module houses ctypes interfaces for GDAL objects. The following GDAL objects are supported: CoordTransform: Used for coordinate transformations from one spatial reference system to another. Driver: Wraps an OGR data source driver. DataSource: Wrapper for the OGR data source object, supports OGR-su...
[ [ 8, 0, 0.3148, 0.6111, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 7, 0, 0.7593, 0.1667, 0, 0.66, 0.25, 0, 0, 1, 0, 0, 0, 0, 0 ], [ 1, 1, 0.7037, 0.0185, 1, 0.93, ...
[ "\"\"\"\n This module houses ctypes interfaces for GDAL objects. The following GDAL\n objects are supported:\n\n CoordTransform: Used for coordinate transformations from one spatial\n reference system to another.\n\n Driver: Wraps an OGR data source driver.", "try:\n from django.contrib.gis.gdal.driver impor...
""" The Spatial Reference class, represensents OGR Spatial Reference objects. Example: >>> from django.contrib.gis.gdal import SpatialReference >>> srs = SpatialReference('WGS84') >>> print(srs) GEOGCS["WGS 84", DATUM["WGS_1984", SPHEROID["WGS 84",6378137,298.257223563, AUTHOR...
[ [ 8, 0, 0.0424, 0.0819, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0848, 0.0029, 0, 0.66, 0.125, 182, 0, 3, 0, 0, 182, 0, 0 ], [ 1, 0, 0.0936, 0.0029, 0, 0.66,...
[ "\"\"\"\n The Spatial Reference class, represensents OGR Spatial Reference objects.\n\n Example:\n >>> from django.contrib.gis.gdal import SpatialReference\n >>> srs = SpatialReference('WGS84')\n >>> print(srs)\n GEOGCS[\"WGS 84\",", "from ctypes import byref, c_char_p, c_int", "from django.contrib.gis.gd...
from django.contrib.admin import ModelAdmin from django.contrib.gis.admin.widgets import OpenLayersWidget from django.contrib.gis.gdal import OGRGeomType from django.contrib.gis.db import models class GeoModelAdmin(ModelAdmin): """ The administration options class for Geographic models. Map settings may be...
[ [ 1, 0, 0.0073, 0.0073, 0, 0.66, 0, 703, 0, 1, 0, 0, 703, 0, 0 ], [ 1, 0, 0.0146, 0.0073, 0, 0.66, 0.1667, 364, 0, 1, 0, 0, 364, 0, 0 ], [ 1, 0, 0.0219, 0.0073, 0, ...
[ "from django.contrib.admin import ModelAdmin", "from django.contrib.gis.admin.widgets import OpenLayersWidget", "from django.contrib.gis.gdal import OGRGeomType", "from django.contrib.gis.db import models", "class GeoModelAdmin(ModelAdmin):\n \"\"\"\n The administration options class for Geographic mo...
import logging from django.forms.widgets import Textarea from django.template import loader, Context from django.templatetags.static import static from django.utils import six from django.utils import translation from django.contrib.gis.gdal import OGRException from django.contrib.gis.geos import GEOSGeometry, GEOSEx...
[ [ 1, 0, 0.0071, 0.0071, 0, 0.66, 0, 715, 0, 1, 0, 0, 715, 0, 0 ], [ 1, 0, 0.0213, 0.0071, 0, 0.66, 0.1, 260, 0, 1, 0, 0, 260, 0, 0 ], [ 1, 0, 0.0284, 0.0071, 0, 0.6...
[ "import logging", "from django.forms.widgets import Textarea", "from django.template import loader, Context", "from django.templatetags.static import static", "from django.utils import six", "from django.utils import translation", "from django.contrib.gis.gdal import OGRException", "from django.contri...
# Getting the normal admin routines, classes, and `site` instance. from django.contrib.admin import autodiscover, site, AdminSite, ModelAdmin, StackedInline, TabularInline, HORIZONTAL, VERTICAL # Geographic admin options classes and widgets. from django.contrib.gis.admin.options import GeoModelAdmin from django.contri...
[ [ 1, 0, 0.1667, 0.0833, 0, 0.66, 0, 703, 0, 8, 0, 0, 703, 0, 0 ], [ 1, 0, 0.4167, 0.0833, 0, 0.66, 0.3333, 833, 0, 1, 0, 0, 833, 0, 0 ], [ 1, 0, 0.5, 0.0833, 0, 0.6...
[ "from django.contrib.admin import autodiscover, site, AdminSite, ModelAdmin, StackedInline, TabularInline, HORIZONTAL, VERTICAL", "from django.contrib.gis.admin.options import GeoModelAdmin", "from django.contrib.gis.admin.widgets import OpenLayersWidget", "try:\n from django.contrib.gis.admin.options impo...
from django.contrib.gis.geos.base import numpy from django.contrib.gis.geos.coordseq import GEOSCoordSeq from django.contrib.gis.geos.error import GEOSException from django.contrib.gis.geos.geometry import GEOSGeometry from django.contrib.gis.geos.point import Point from django.contrib.gis.geos import prototypes as cap...
[ [ 1, 0, 0.0065, 0.0065, 0, 0.66, 0, 386, 0, 1, 0, 0, 386, 0, 0 ], [ 1, 0, 0.0131, 0.0065, 0, 0.66, 0.125, 849, 0, 1, 0, 0, 849, 0, 0 ], [ 1, 0, 0.0196, 0.0065, 0, 0...
[ "from django.contrib.gis.geos.base import numpy", "from django.contrib.gis.geos.coordseq import GEOSCoordSeq", "from django.contrib.gis.geos.error import GEOSException", "from django.contrib.gis.geos.geometry import GEOSGeometry", "from django.contrib.gis.geos.point import Point", "from django.contrib.gis...
""" This module houses the GEOS exceptions, specifically, GEOSException and GEOSGeometryIndexError. """ class GEOSException(Exception): "The base GEOS exception, indicates a GEOS-related error." pass class GEOSIndexError(GEOSException, KeyError): """ This exception is raised when an invalid index is...
[ [ 8, 0, 0.125, 0.2, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 3, 0, 0.35, 0.15, 0, 0.66, 0.5, 290, 0, 0, 0, 0, 645, 0, 0 ], [ 8, 1, 0.35, 0.05, 1, 0.13, 0, 0,...
[ "\"\"\"\n This module houses the GEOS exceptions, specifically, GEOSException and\n GEOSGeometryIndexError.\n\"\"\"", "class GEOSException(Exception):\n \"The base GEOS exception, indicates a GEOS-related error.\"\n pass", " \"The base GEOS exception, indicates a GEOS-related error.\"", "class GEOSIn...
""" Module that holds classes for performing I/O operations on GEOS geometry objects. Specifically, this has Python implementations of WKB/WKT reader and writer classes. """ from django.contrib.gis.geos.geometry import GEOSGeometry from django.contrib.gis.geos.prototypes.io import _WKTReader, _WKBReader, WKBWriter, WK...
[ [ 8, 0, 0.15, 0.25, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.3, 0.05, 0, 0.66, 0.25, 843, 0, 1, 0, 0, 843, 0, 0 ], [ 1, 0, 0.35, 0.05, 0, 0.66, 0.5, ...
[ "\"\"\"\nModule that holds classes for performing I/O operations on GEOS geometry\nobjects. Specifically, this has Python implementations of WKB/WKT\nreader and writer classes.\n\"\"\"", "from django.contrib.gis.geos.geometry import GEOSGeometry", "from django.contrib.gis.geos.prototypes.io import _WKTReader, ...
""" This module houses the Geometry Collection objects: GeometryCollection, MultiPoint, MultiLineString, and MultiPolygon """ from ctypes import c_int, c_uint, byref from django.contrib.gis.geos.error import GEOSException from django.contrib.gis.geos.geometry import GEOSGeometry from django.contrib.gis.geos.libgeos i...
[ [ 8, 0, 0.0202, 0.0323, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0403, 0.0081, 0, 0.66, 0.0714, 182, 0, 3, 0, 0, 182, 0, 0 ], [ 1, 0, 0.0484, 0.0081, 0, 0.66...
[ "\"\"\"\n This module houses the Geometry Collection objects:\n GeometryCollection, MultiPoint, MultiLineString, and MultiPolygon\n\"\"\"", "from ctypes import c_int, c_uint, byref", "from django.contrib.gis.geos.error import GEOSException", "from django.contrib.gis.geos.geometry import GEOSGeometry", "from...
from ctypes import c_char_p, c_int, c_size_t, c_ubyte, POINTER from django.contrib.gis.geos.libgeos import CS_PTR, GEOM_PTR from django.contrib.gis.geos.prototypes.errcheck import ( check_geom, check_minus_one, check_sized_string, check_string, check_zero) from django.contrib.gis.geos.prototypes.threadsafe import G...
[ [ 1, 0, 0.0084, 0.0084, 0, 0.66, 0, 182, 0, 5, 0, 0, 182, 0, 0 ], [ 1, 0, 0.0168, 0.0084, 0, 0.66, 0.0227, 64, 0, 2, 0, 0, 64, 0, 0 ], [ 1, 0, 0.0294, 0.0168, 0, 0....
[ "from ctypes import c_char_p, c_int, c_size_t, c_ubyte, POINTER", "from django.contrib.gis.geos.libgeos import CS_PTR, GEOM_PTR", "from django.contrib.gis.geos.prototypes.errcheck import (\n check_geom, check_minus_one, check_sized_string, check_string, check_zero)", "from django.contrib.gis.geos.prototype...
import threading from ctypes import byref, c_char_p, c_int, c_char, c_size_t, Structure, POINTER from django.contrib.gis import memoryview from django.contrib.gis.geos.base import GEOSBase from django.contrib.gis.geos.libgeos import GEOM_PTR from django.contrib.gis.geos.prototypes.errcheck import check_geom, check_stri...
[ [ 1, 0, 0.0041, 0.0041, 0, 0.66, 0, 83, 0, 1, 0, 0, 83, 0, 0 ], [ 1, 0, 0.0083, 0.0041, 0, 0.66, 0.0149, 182, 0, 7, 0, 0, 182, 0, 0 ], [ 1, 0, 0.0124, 0.0041, 0, 0....
[ "import threading", "from ctypes import byref, c_char_p, c_int, c_char, c_size_t, Structure, POINTER", "from django.contrib.gis import memoryview", "from django.contrib.gis.geos.base import GEOSBase", "from django.contrib.gis.geos.libgeos import GEOM_PTR", "from django.contrib.gis.geos.prototypes.errcheck...
""" Error checking functions for GEOS ctypes prototype functions. """ import os from ctypes import c_void_p, string_at, CDLL from django.contrib.gis.geos.error import GEOSException from django.contrib.gis.geos.libgeos import GEOS_VERSION from django.contrib.gis.geos.prototypes.threadsafe import GEOSFunc # Getting the...
[ [ 8, 0, 0.0211, 0.0316, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0421, 0.0105, 0, 0.66, 0.0714, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 1, 0, 0.0526, 0.0105, 0, 0.66...
[ "\"\"\"\n Error checking functions for GEOS ctypes prototype functions.\n\"\"\"", "import os", "from ctypes import c_void_p, string_at, CDLL", "from django.contrib.gis.geos.error import GEOSException", "from django.contrib.gis.geos.libgeos import GEOS_VERSION", "from django.contrib.gis.geos.prototypes.thr...
""" This module houses the GEOS ctypes prototype functions for the topological operations on geometries. """ __all__ = ['geos_boundary', 'geos_buffer', 'geos_centroid', 'geos_convexhull', 'geos_difference', 'geos_envelope', 'geos_intersection', 'geos_linemerge', 'geos_pointonsurface', 'geos_pre...
[ [ 8, 0, 0.0391, 0.0625, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.1016, 0.0625, 0, 0.66, 0.037, 272, 0, 0, 0, 0, 0, 5, 0 ], [ 1, 0, 0.1562, 0.0156, 0, 0.66, ...
[ "\"\"\"\n This module houses the GEOS ctypes prototype functions for the\n topological operations on geometries.\n\"\"\"", "__all__ = ['geos_boundary', 'geos_buffer', 'geos_centroid', 'geos_convexhull',\n 'geos_difference', 'geos_envelope', 'geos_intersection', \n 'geos_linemerge', 'geos_point...
import threading from django.contrib.gis.geos.libgeos import lgeos, notice_h, error_h, CONTEXT_PTR class GEOSContextHandle(object): """ Python object representing a GEOS context handle. """ def __init__(self): # Initializing the context handler for this thread with # the notice and erro...
[ [ 1, 0, 0.0116, 0.0116, 0, 0.66, 0, 83, 0, 1, 0, 0, 83, 0, 0 ], [ 1, 0, 0.0233, 0.0116, 0, 0.66, 0.2, 64, 0, 4, 0, 0, 64, 0, 0 ], [ 3, 0, 0.1047, 0.1279, 0, 0.66, ...
[ "import threading", "from django.contrib.gis.geos.libgeos import lgeos, notice_h, error_h, CONTEXT_PTR", "class GEOSContextHandle(object):\n \"\"\"\n Python object representing a GEOS context handle.\n \"\"\"\n def __init__(self):\n # Initializing the context handler for this thread with\n ...
from ctypes import c_char from django.contrib.gis.geos.libgeos import GEOM_PTR, PREPGEOM_PTR from django.contrib.gis.geos.prototypes.errcheck import check_predicate from django.contrib.gis.geos.prototypes.threadsafe import GEOSFunc # Prepared geometry constructor and destructors. geos_prepare = GEOSFunc('GEOSPrepare')...
[ [ 1, 0, 0.04, 0.04, 0, 0.66, 0, 182, 0, 1, 0, 0, 182, 0, 0 ], [ 1, 0, 0.08, 0.04, 0, 0.66, 0.0714, 64, 0, 2, 0, 0, 64, 0, 0 ], [ 1, 0, 0.12, 0.04, 0, 0.66, 0.14...
[ "from ctypes import c_char", "from django.contrib.gis.geos.libgeos import GEOM_PTR, PREPGEOM_PTR", "from django.contrib.gis.geos.prototypes.errcheck import check_predicate", "from django.contrib.gis.geos.prototypes.threadsafe import GEOSFunc", "geos_prepare = GEOSFunc('GEOSPrepare')", "geos_prepare.argtyp...
from ctypes import c_double, c_int, c_uint, POINTER from django.contrib.gis.geos.libgeos import GEOM_PTR, CS_PTR from django.contrib.gis.geos.prototypes.errcheck import last_arg_byref, GEOSException from django.contrib.gis.geos.prototypes.threadsafe import GEOSFunc ## Error-checking routines specific to coordinate seq...
[ [ 1, 0, 0.012, 0.012, 0, 0.66, 0, 182, 0, 4, 0, 0, 182, 0, 0 ], [ 1, 0, 0.0241, 0.012, 0, 0.66, 0.0455, 64, 0, 2, 0, 0, 64, 0, 0 ], [ 1, 0, 0.0361, 0.012, 0, 0.66, ...
[ "from ctypes import c_double, c_int, c_uint, POINTER", "from django.contrib.gis.geos.libgeos import GEOM_PTR, CS_PTR", "from django.contrib.gis.geos.prototypes.errcheck import last_arg_byref, GEOSException", "from django.contrib.gis.geos.prototypes.threadsafe import GEOSFunc", "def check_cs_ptr(result, func...
""" This module is for the miscellaneous GEOS routines, particularly the ones that return the area, distance, and length. """ from ctypes import c_int, c_double, POINTER from django.contrib.gis.geos.libgeos import GEOM_PTR, GEOS_PREPARE from django.contrib.gis.geos.prototypes.errcheck import check_dbl, check_string f...
[ [ 8, 0, 0.0625, 0.1, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.125, 0.025, 0, 0.66, 0.0833, 182, 0, 3, 0, 0, 182, 0, 0 ], [ 1, 0, 0.15, 0.025, 0, 0.66, 0....
[ "\"\"\"\n This module is for the miscellaneous GEOS routines, particularly the\n ones that return the area, distance, and length.\n\"\"\"", "from ctypes import c_int, c_double, POINTER", "from django.contrib.gis.geos.libgeos import GEOM_PTR, GEOS_PREPARE", "from django.contrib.gis.geos.prototypes.errcheck imp...
""" This module contains all of the GEOS ctypes function prototypes. Each prototype handles the interaction between the GEOS library and Python via ctypes. """ # Coordinate sequence routines. from django.contrib.gis.geos.prototypes.coordseq import (create_cs, get_cs, cs_clone, cs_getordinate, cs_setordinate, cs...
[ [ 8, 0, 0.1, 0.1667, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.3, 0.1, 0, 0.66, 0.2, 928, 0, 13, 0, 0, 928, 0, 0 ], [ 1, 0, 0.5167, 0.2, 0, 0.66, 0.4, ...
[ "\"\"\"\n This module contains all of the GEOS ctypes function prototypes. Each\n prototype handles the interaction between the GEOS library and Python\n via ctypes.\n\"\"\"", "from django.contrib.gis.geos.prototypes.coordseq import (create_cs, get_cs,\n cs_clone, cs_getordinate, cs_setordinate, cs_getx, cs_ge...
""" This module houses the GEOS ctypes prototype functions for the unary and binary predicate operations on geometries. """ from ctypes import c_char, c_char_p, c_double from django.contrib.gis.geos.libgeos import GEOM_PTR from django.contrib.gis.geos.prototypes.errcheck import check_predicate from django.contrib.gis...
[ [ 8, 0, 0.0568, 0.0909, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.1136, 0.0227, 0, 0.66, 0.0476, 182, 0, 3, 0, 0, 182, 0, 0 ], [ 1, 0, 0.1364, 0.0227, 0, 0.66...
[ "\"\"\"\n This module houses the GEOS ctypes prototype functions for the\n unary and binary predicate operations on geometries.\n\"\"\"", "from ctypes import c_char, c_char_p, c_double", "from django.contrib.gis.geos.libgeos import GEOM_PTR", "from django.contrib.gis.geos.prototypes.errcheck import check_pred...
# Copyright (c) 2008-2009 Aryeh Leib Taurog, all rights reserved. # Released under the New BSD license. """ This module contains a base type which provides list-style mutations without specific data storage methods. See also http://www.aryehleib.com/MutableLists.html Author: Aryeh Leib Taurog. """ from django.utils.f...
[ [ 8, 0, 0.0198, 0.0244, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0335, 0.003, 0, 0.66, 0.25, 375, 0, 1, 0, 0, 375, 0, 0 ], [ 1, 0, 0.0366, 0.003, 0, 0.66, ...
[ "\"\"\"\nThis module contains a base type which provides list-style mutations\nwithout specific data storage methods.\n\nSee also http://www.aryehleib.com/MutableLists.html\n\nAuthor: Aryeh Leib Taurog.\n\"\"\"", "from django.utils.functional import total_ordering", "from django.utils import six", "from djang...
""" This module houses the ctypes initialization procedures, as well as the notice and error handler function callbacks (get called when an error occurs in GEOS). This module also houses GEOS Pointer utilities, including get_pointer_arr(), and GEOM_PTR. """ import logging import os import re from ctypes import c_...
[ [ 8, 0, 0.029, 0.0516, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0581, 0.0065, 0, 0.66, 0.025, 715, 0, 1, 0, 0, 715, 0, 0 ], [ 1, 0, 0.0645, 0.0065, 0, 0.66, ...
[ "\"\"\"\n This module houses the ctypes initialization procedures, as well\n as the notice and error handler function callbacks (get called\n when an error occurs in GEOS).\n\n This module also houses GEOS Pointer utilities, including\n get_pointer_arr(), and GEOM_PTR.\n\"\"\"", "import logging", "import os", ...
""" GEOS Testing module. """ from __future__ import absolute_import from django.utils.unittest import TestSuite, TextTestRunner from . import test_geos, test_io, test_geos_mutation, test_mutable_list test_suites = [ test_geos.suite(), test_io.suite(), test_geos_mutation.suite(), test_mutable_list.suit...
[ [ 8, 0, 0.0714, 0.1071, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.1429, 0.0357, 0, 0.66, 0.1429, 777, 0, 1, 0, 0, 777, 0, 0 ], [ 1, 0, 0.2143, 0.0357, 0, 0.66...
[ "\"\"\"\nGEOS Testing module.\n\"\"\"", "from __future__ import absolute_import", "from django.utils.unittest import TestSuite, TextTestRunner", "from . import test_geos, test_io, test_geos_mutation, test_mutable_list", "test_suites = [\n test_geos.suite(),\n test_io.suite(),\n test_geos_mutation.s...
from ctypes import c_uint, byref from django.contrib.gis.geos.geometry import GEOSGeometry from django.contrib.gis.geos.libgeos import get_pointer_arr, GEOM_PTR from django.contrib.gis.geos.linestring import LinearRing from django.contrib.gis.geos import prototypes as capi from django.utils import six from django.utils...
[ [ 1, 0, 0.0059, 0.0059, 0, 0.66, 0, 182, 0, 2, 0, 0, 182, 0, 0 ], [ 1, 0, 0.0118, 0.0059, 0, 0.66, 0.1429, 843, 0, 1, 0, 0, 843, 0, 0 ], [ 1, 0, 0.0176, 0.0059, 0, ...
[ "from ctypes import c_uint, byref", "from django.contrib.gis.geos.geometry import GEOSGeometry", "from django.contrib.gis.geos.libgeos import get_pointer_arr, GEOM_PTR", "from django.contrib.gis.geos.linestring import LinearRing", "from django.contrib.gis.geos import prototypes as capi", "from django.util...
from django.contrib.gis.geos.base import GEOSBase from django.contrib.gis.geos.geometry import GEOSGeometry from django.contrib.gis.geos.prototypes import prepared as capi class PreparedGeometry(GEOSBase): """ A geometry that is prepared for performing certain operations. At the moment this includes the co...
[ [ 1, 0, 0.0333, 0.0333, 0, 0.66, 0, 386, 0, 1, 0, 0, 386, 0, 0 ], [ 1, 0, 0.0667, 0.0333, 0, 0.66, 0.3333, 843, 0, 1, 0, 0, 843, 0, 0 ], [ 1, 0, 0.1, 0.0333, 0, 0.6...
[ "from django.contrib.gis.geos.base import GEOSBase", "from django.contrib.gis.geos.geometry import GEOSGeometry", "from django.contrib.gis.geos.prototypes import prepared as capi", "class PreparedGeometry(GEOSBase):\n \"\"\"\n A geometry that is prepared for performing certain operations.\n At the mo...
""" This module houses the GEOSCoordSeq object, which is used internally by GEOSGeometry to house the actual coordinates of the Point, LineString, and LinearRing geometries. """ from ctypes import c_double, c_uint, byref from django.contrib.gis.geos.base import GEOSBase, numpy from django.contrib.gis.geos.error impo...
[ [ 8, 0, 0.0191, 0.0318, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0382, 0.0064, 0, 0.66, 0.1429, 182, 0, 3, 0, 0, 182, 0, 0 ], [ 1, 0, 0.0446, 0.0064, 0, 0.66...
[ "\"\"\"\n This module houses the GEOSCoordSeq object, which is used internally\n by GEOSGeometry to house the actual coordinates of the Point,\n LineString, and LinearRing geometries.\n\"\"\"", "from ctypes import c_double, c_uint, byref", "from django.contrib.gis.geos.base import GEOSBase, numpy", "from djan...
from ctypes import c_void_p from django.contrib.gis.geos.error import GEOSException # Trying to import GDAL libraries, if available. Have to place in # try/except since this package may be used outside GeoDjango. try: from django.contrib.gis import gdal except ImportError: # A 'dummy' gdal module. class ...
[ [ 1, 0, 0.0196, 0.0196, 0, 0.66, 0, 182, 0, 1, 0, 0, 182, 0, 0 ], [ 1, 0, 0.0588, 0.0196, 0, 0.66, 0.25, 827, 0, 1, 0, 0, 827, 0, 0 ], [ 7, 0, 0.1961, 0.1373, 0, 0....
[ "from ctypes import c_void_p", "from django.contrib.gis.geos.error import GEOSException", "try:\n from django.contrib.gis import gdal\nexcept ImportError:\n # A 'dummy' gdal module.\n class GDALInfo(object):\n HAS_GDAL = False\n gdal = GDALInfo()", " from django.contrib.gis import gdal",...
""" This module contains the 'base' GEOSGeometry object -- all GEOS Geometries inherit from this object. """ from __future__ import unicode_literals # Python, ctypes and types dependencies. from ctypes import addressof, byref, c_double from django.contrib.gis import memoryview # super-class for mutable list behavio...
[ [ 8, 0, 0.0035, 0.0056, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.007, 0.0014, 0, 0.66, 0.0476, 777, 0, 1, 0, 0, 777, 0, 0 ], [ 1, 0, 0.0113, 0.0014, 0, 0.66,...
[ "\"\"\"\n This module contains the 'base' GEOSGeometry object -- all GEOS Geometries\n inherit from this object.\n\"\"\"", "from __future__ import unicode_literals", "from ctypes import addressof, byref, c_double", "from django.contrib.gis import memoryview", "from django.contrib.gis.geos.mutable_list impor...
from ctypes import c_uint from django.contrib.gis.geos.error import GEOSException from django.contrib.gis.geos.geometry import GEOSGeometry from django.contrib.gis.geos import prototypes as capi from django.utils import six from django.utils.six.moves import xrange class Point(GEOSGeometry): _minlength = 2 _ma...
[ [ 1, 0, 0.0073, 0.0073, 0, 0.66, 0, 182, 0, 1, 0, 0, 182, 0, 0 ], [ 1, 0, 0.0146, 0.0073, 0, 0.66, 0.1667, 827, 0, 1, 0, 0, 827, 0, 0 ], [ 1, 0, 0.0219, 0.0073, 0, ...
[ "from ctypes import c_uint", "from django.contrib.gis.geos.error import GEOSException", "from django.contrib.gis.geos.geometry import GEOSGeometry", "from django.contrib.gis.geos import prototypes as capi", "from django.utils import six", "from django.utils.six.moves import xrange", "class Point(GEOSGeo...
""" The GeoDjango GEOS module. Please consult the GeoDjango documentation for more details: http://geodjango.org/docs/geos.html """ from django.contrib.gis.geos.geometry import GEOSGeometry, wkt_regex, hex_regex from django.contrib.gis.geos.point import Point from django.contrib.gis.geos.linestring import LineStrin...
[ [ 8, 0, 0.2143, 0.3571, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.4286, 0.0714, 0, 0.66, 0.1111, 843, 0, 3, 0, 0, 843, 0, 0 ], [ 1, 0, 0.5, 0.0714, 0, 0.66, ...
[ "\"\"\"\nThe GeoDjango GEOS module. Please consult the GeoDjango documentation\nfor more details: \n http://geodjango.org/docs/geos.html\n\"\"\"", "from django.contrib.gis.geos.geometry import GEOSGeometry, wkt_regex, hex_regex", "from django.contrib.gis.geos.point import Point", "from django.contrib.gis.ge...
from django.contrib.gis import memoryview from django.contrib.gis.geos.geometry import GEOSGeometry, wkt_regex, hex_regex from django.utils import six def fromfile(file_h): """ Given a string file name, returns a GEOSGeometry. The file may contain WKB, WKT, or HEX. """ # If given a file name, get...
[ [ 1, 0, 0.0286, 0.0286, 0, 0.66, 0, 735, 0, 1, 0, 0, 735, 0, 0 ], [ 1, 0, 0.0571, 0.0286, 0, 0.66, 0.25, 843, 0, 3, 0, 0, 843, 0, 0 ], [ 1, 0, 0.1143, 0.0286, 0, 0....
[ "from django.contrib.gis import memoryview", "from django.contrib.gis.geos.geometry import GEOSGeometry, wkt_regex, hex_regex", "from django.utils import six", "def fromfile(file_h):\n \"\"\"\n Given a string file name, returns a GEOSGeometry. The file may contain WKB,\n WKT, or HEX.\n \"\"\"\n ...
from django.core.management.commands.inspectdb import Command as InspectDBCommand class Command(InspectDBCommand): db_module = 'django.contrib.gis.db' gis_tables = {} def get_field_type(self, connection, table_name, row): field_type, field_params, field_notes = super(Command, self).get_field_type(...
[ [ 1, 0, 0.0345, 0.0345, 0, 0.66, 0, 296, 0, 1, 0, 0, 296, 0, 0 ], [ 3, 0, 0.5517, 0.931, 0, 0.66, 1, 73, 0, 2, 0, 0, 559, 0, 8 ], [ 14, 1, 0.1379, 0.0345, 1, 0.85, ...
[ "from django.core.management.commands.inspectdb import Command as InspectDBCommand", "class Command(InspectDBCommand):\n db_module = 'django.contrib.gis.db'\n gis_tables = {}\n\n def get_field_type(self, connection, table_name, row):\n field_type, field_params, field_notes = super(Command, self).g...
import os from optparse import make_option from django.contrib.gis import gdal from django.core.management.base import LabelCommand, CommandError def layer_option(option, opt, value, parser): """ Callback for `make_option` for the `ogrinspect` `layer_key` keyword option which may be an integer or a string....
[ [ 1, 0, 0.0084, 0.0084, 0, 0.66, 0, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 1, 0, 0.0168, 0.0084, 0, 0.66, 0.1667, 323, 0, 1, 0, 0, 323, 0, 0 ], [ 1, 0, 0.0252, 0.0084, 0, ...
[ "import os", "from optparse import make_option", "from django.contrib.gis import gdal", "from django.core.management.base import LabelCommand, CommandError", "def layer_option(option, opt, value, parser):\n \"\"\"\n Callback for `make_option` for the `ogrinspect` `layer_key`\n keyword option which ...
from __future__ import unicode_literals from django.http import Http404 from django.utils.translation import ugettext as _ def feed(request, url, feed_dict=None): """Provided for backwards compatibility.""" if not feed_dict: raise Http404(_("No feeds are registered.")) try: slug, param = ...
[ [ 1, 0, 0.04, 0.04, 0, 0.66, 0, 777, 0, 1, 0, 0, 777, 0, 0 ], [ 1, 0, 0.12, 0.04, 0, 0.66, 0.3333, 779, 0, 1, 0, 0, 779, 0, 0 ], [ 1, 0, 0.16, 0.04, 0, 0.66, 0....
[ "from __future__ import unicode_literals", "from django.http import Http404", "from django.utils.translation import ugettext as _", "def feed(request, url, feed_dict=None):\n \"\"\"Provided for backwards compatibility.\"\"\"\n if not feed_dict:\n raise Http404(_(\"No feeds are registered.\"))\n\n...
from __future__ import unicode_literals from django import forms from django.utils.translation import ugettext_lazy as _ # While this couples the geographic forms to the GEOS library, # it decouples from database (by not importing SpatialBackend). from django.contrib.gis.geos import GEOSException, GEOSGeometry class...
[ [ 1, 0, 0.0133, 0.0133, 0, 0.66, 0, 777, 0, 1, 0, 0, 777, 0, 0 ], [ 1, 0, 0.04, 0.0133, 0, 0.66, 0.25, 294, 0, 1, 0, 0, 294, 0, 0 ], [ 1, 0, 0.0533, 0.0133, 0, 0.66...
[ "from __future__ import unicode_literals", "from django import forms", "from django.utils.translation import ugettext_lazy as _", "from django.contrib.gis.geos import GEOSException, GEOSGeometry", "class GeometryField(forms.Field):\n \"\"\"\n This is the basic form field for a Geometry. Any textual i...
from django.forms import * from django.contrib.gis.forms.fields import GeometryField
[ [ 1, 0, 0.5, 0.5, 0, 0.66, 0, 666, 0, 1, 0, 0, 666, 0, 0 ], [ 1, 0, 1, 0.5, 0, 0.66, 1, 391, 0, 1, 0, 0, 391, 0, 0 ] ]
[ "from django.forms import *", "from django.contrib.gis.forms.fields import GeometryField" ]
from django.utils import six if six.PY3: memoryview = memoryview else: memoryview = buffer
[ [ 1, 0, 0.1667, 0.1667, 0, 0.66, 0, 944, 0, 1, 0, 0, 944, 0, 0 ], [ 4, 0, 0.75, 0.6667, 0, 0.66, 1, 0, 7, 0, 0, 0, 0, 0, 0 ], [ 14, 1, 0.6667, 0.1667, 1, 0.89, ...
[ "from django.utils import six", "if six.PY3:\n memoryview = memoryview\nelse:\n memoryview = buffer", " memoryview = memoryview", " memoryview = buffer" ]
from django.db import connections from django.db.models.query import QuerySet, ValuesQuerySet, ValuesListQuerySet from django.contrib.gis import memoryview from django.contrib.gis.db.models import aggregates from django.contrib.gis.db.models.fields import get_srid_info, PointField, LineStringField from django.contrib....
[ [ 1, 0, 0.0013, 0.0013, 0, 0.66, 0, 40, 0, 1, 0, 0, 40, 0, 0 ], [ 1, 0, 0.0026, 0.0013, 0, 0.66, 0.0909, 793, 0, 3, 0, 0, 793, 0, 0 ], [ 1, 0, 0.0051, 0.0013, 0, 0....
[ "from django.db import connections", "from django.db.models.query import QuerySet, ValuesQuerySet, ValuesListQuerySet", "from django.contrib.gis import memoryview", "from django.contrib.gis.db.models import aggregates", "from django.contrib.gis.db.models.fields import get_srid_info, PointField, LineStringFi...
from django.db.models.fields import Field from django.db.models.sql.expressions import SQLEvaluator from django.utils.translation import ugettext_lazy as _ from django.contrib.gis import forms from django.contrib.gis.db.models.proxy import GeometryProxy from django.contrib.gis.geometry.backend import Geometry, Geometry...
[ [ 1, 0, 0.0034, 0.0034, 0, 0.66, 0, 5, 0, 1, 0, 0, 5, 0, 0 ], [ 1, 0, 0.0068, 0.0034, 0, 0.66, 0.0625, 438, 0, 1, 0, 0, 438, 0, 0 ], [ 1, 0, 0.0102, 0.0034, 0, 0.66...
[ "from django.db.models.fields import Field", "from django.db.models.sql.expressions import SQLEvaluator", "from django.utils.translation import ugettext_lazy as _", "from django.contrib.gis import forms", "from django.contrib.gis.db.models.proxy import GeometryProxy", "from django.contrib.gis.geometry.bac...