Exemplo n.º 1
0
    so we need to get just the first part of that.
    """
    if "_" in name:
        return name.split('_')[0]
    else:
        return name

# This SHAPEFILES dictionary is a sample. You should delete (or comment out)
# the first entry if you don't care about neighborhoods in Chicago.
SHAPEFILES = {

    'Wards': {
        'file': 'Ward02Ply/Ward02Ply.shp',
        'singular': 'Ward',
        'kind_first': True,
        'ider': utils.simple_namer(['WARD_ID']),
        'namer': utils.simple_namer(['WARD_ID']),
        'authority': 'DC Office of the Chief Technology Officer',
        'domain': 'Washington, DC',
        'last_updated': date(2011, 2, 26),
        'href': 'http://data.dc.gov/Metadata.aspx?id=126',
        'notes': '',
        'encoding': '',
    },
    
    'Neighborhood Clusters': {
        'file': 'NbhClusPly/NbhClusPly.shp',
        'singular': 'Neighborhood Cluster',
        'kind_first': False,
        'ider': utils.simple_namer(['GIS_ID']),
        'namer': utils.simple_namer(['NBH_NAMES']),
Exemplo n.º 2
0
from django.contrib.humanize.templatetags.humanize import ordinal

import utils

SHAPEFILES = {
    # This key should be the plural name of the boundaries in this set
    'Counties': {
        # Path to a shapefile, relative to /data/shapefiles
        'file': '04_Arizona/04/tl_2010_04_county10.shp',
        # Generic singular name for an boundary of from this set
        'singular': 'County',
        # Should the singular name come first when creating canonical identifiers for this set?
        'kind_first': False,
        # Function which each feature wall be passed to in order to extract its "external_id" property
        # The utils module contains several generic functions for doing this
        'ider': utils.simple_namer(['COUNTYFP10']),
        # Function which each feature will be passed to in order to extract its "name" property
        'namer': utils.simple_namer(['NAME10']),
        # Authority that is responsible for the accuracy of this data
        'authority': 'Census',
        # Geographic extents which the boundary set encompasses
        'domain': 'Arizona',
        # Last time the source was checked for new data
        'last_updated': date(2011, 6, 18),
        # A url to the source of the data
        'href': 'http://www.census.gov/geo/www/tiger/',
        # Notes identifying any pecularities about the data, such as columns that were deleted or files which were merged
        'notes': '',
        # Encoding of the text fields in the shapefile, i.e. 'utf-8'. If this is left empty 'ascii' is assumed
        'encoding': 'utf-8',
        # SRID of the geometry data in the shapefile if it can not be inferred from an accompanying .prj file
Exemplo n.º 3
0
import utils

SHAPEFILES = {
    # This key should be the plural name of the boundaries in this set
    'Neighborhoods': {
        # Path to a shapefile, relative to /data
        'file': 'neighborhoods/Neighboorhoods.shp',
        # Generic singular name for an boundary of from this set
        'singular': 'Neighborhood',
        # Should the singular name come first when creating canonical identifiers for this set?
        # (e.g. True in this case would result in "Neighborhood South Austin" rather than "South Austin Neighborhood")
        'kind_first': False,
        # Function which each feature wall be passed to in order to extract its "external_id" property
        # The utils module contains several generic functions for doing this
        'ider': utils.simple_namer(['PRI_NEIGH_']),
        # Function which each feature will be passed to in order to extract its "name" property
        'namer': utils.simple_namer(['PRI_NEIGH']),
        # Authority that is responsible for the accuracy of this data
        'authority': 'City of Chicago',
        # Geographic extents which the boundary set encompasses
        'domain': 'Chicago',
        # Last time the source was checked for new data
        'last_updated': date(2010, 12, 12),
        # A url to the source of the data
        'href': 'http://www.cityofchicago.org/city/en/depts/doit/supp_info/gis_data.html',
        # Notes identifying any pecularities about the data, such as columns that were deleted or files which were merged
        'notes': '',
        # Encoding of the text fields in the shapefile, i.e. 'utf-8'. If this is left empty 'ascii' is assumed
        'encoding': ''
        # SRID of the geometry data in the shapefile if it can not be inferred from an accompanying .prj file
Exemplo n.º 4
0
"""
Configuration describing the shapefiles to be loaded for django-boundaryservice.
"""
from datetime import date

from django.contrib.humanize.templatetags.humanize import ordinal

import utils

SHAPEFILES = {
    'Community Areas': {
        'file': 'community_areas/CommAreas.shp',
        'singular': 'Community Area',
        'kind_first': False,
        'ider': utils.simple_namer(['AREA_NUMBE']),
        'namer': utils.simple_namer(['COMMUNITY'], normalizer=lambda s: s.title()),
        'authority': 'City of Chicago',
        'domain': 'Chicago',
        'last_updated': date(2010, 12, 12),
        'href': 'http://www.cityofchicago.org/city/en/depts/doit/supp_info/gis_data.html',
        'notes': '',
        'encoding': ''
    },
    'Neighborhoods': {
        'file': 'neighborhoods/Neighboorhoods.shp',
        'singular': 'Neighborhood',
        'kind_first': False,
        'ider': utils.simple_namer(['PRI_NEIGH_']),
        'namer': utils.simple_namer(['PRI_NEIGH']),
        'authority': 'City of Chicago',
        'domain': 'Chicago',
Exemplo n.º 5
0
from django.contrib.humanize.templatetags.humanize import ordinal

import utils

SHAPEFILES = {
    # This key should be the plural name of the boundaries in this set
    'Counties': {
        # Path to a shapefile, relative to /data/shapefiles
        'file': '04_Arizona/04/tl_2010_04_county10.shp',
        # Generic singular name for an boundary of from this set
        'singular': 'County',
        # Should the singular name come first when creating canonical identifiers for this set?
        'kind_first': False,
        # Function which each feature wall be passed to in order to extract its "external_id" property
        # The utils module contains several generic functions for doing this
        'ider': utils.simple_namer(['COUNTYFP10']),
        # Function which each feature will be passed to in order to extract its "name" property
        'namer': utils.simple_namer(['NAME10']),
        # Authority that is responsible for the accuracy of this data
        'authority': 'Census',
        # Geographic extents which the boundary set encompasses
        'domain': 'Arizona',
        # Last time the source was checked for new data
        'last_updated': date(2011, 6, 18),
        # A url to the source of the data
        'href': 'http://www.census.gov/geo/www/tiger/',
        # Notes identifying any pecularities about the data, such as columns that were deleted or files which were merged
        'notes': '',
        # Encoding of the text fields in the shapefile, i.e. 'utf-8'. If this is left empty 'ascii' is assumed
        'encoding': 'utf-8',
        # SRID of the geometry data in the shapefile if it can not be inferred from an accompanying .prj file
Exemplo n.º 6
0
 #    # A url to the source of the data
 #    'href': 'http://www.cityofchicago.org/city/en/depts/doit/supp_info/gis_data.html',
 #    # Notes identifying any pecularities about the data, such as columns that were deleted or files which were merged
 #    'notes': '',
 #    # Encoding of the text fields in the shapefile, i.e. 'utf-8'. If this is left empty 'ascii' is assumed
 #    'encoding': ''
 #    # SRID of the geometry data in the shapefile if it can not be inferred from an accompanying .prj file
 #    # This is normally not necessary and can be left undefined or set to an empty string to maintain the default behavior
 #    #'srid': ''
 #},
 
 'Cities': {
     'file': 'DCBndyPly/DCGIS_DCBndyPly.shp',
     'singular': 'City',
     'kind_first': False,
     'ider': utils.simple_namer(['CITY_NAME']),
     'namer': utils.simple_namer(['CITY_NAME']),
     'authority': 'DC Office of the Chief Technology Officer',
     'domain': 'Washington, DC',
     'last_updated': date(2011, 3, 2),
     'href': 'http://data.dc.gov/Metadata.aspx?id=74',
     'notes': '',
     'encoding': '',
 },
 
 'Wards': {
     'file': 'Ward02Ply/Ward02Ply.shp',
     'singular': 'Ward',
     'kind_first': True,
     'ider': utils.simple_namer(['WARD_ID']),
     'namer': utils.simple_namer(['WARD_ID']),
Exemplo n.º 7
0
import utils

SHAPEFILES = {
    # This key should be the plural name of the boundaries in this set
    'Neighborhoods': {
        # Path to a shapefile, relative to /data
        'file': 'neighborhoods/Neighboorhoods.shp',
        # Generic singular name for an boundary of from this set
        'singular': 'Neighborhood',
        # Should the singular name come first when creating canonical identifiers for this set?
        # (e.g. True in this case would result in "Neighborhood South Austin" rather than "South Austin Neighborhood")
        'kind_first': False,
        # Function which each feature wall be passed to in order to extract its "external_id" property
        # The utils module contains several generic functions for doing this
        'ider': utils.simple_namer(['PRI_NEIGH_']),
        # Function which each feature will be passed to in order to extract its "name" property
        'namer': utils.simple_namer(['PRI_NEIGH']),
        # Authority that is responsible for the accuracy of this data
        'authority': 'City of Chicago',
        # Geographic extents which the boundary set encompasses
        'domain': 'Chicago',
        # Last time the source was checked for new data
        'last_updated': date(2010, 12, 12),
        # A url to the source of the data
        'href':
        'http://www.cityofchicago.org/city/en/depts/doit/supp_info/gis_data.html',
        # Notes identifying any pecularities about the data, such as columns that were deleted or files which were merged
        'notes': '',
        # Encoding of the text fields in the shapefile, i.e. 'utf-8'. If this is left empty 'ascii' is assumed
        'encoding': ''
Exemplo n.º 8
0
 #    'last_updated': date(2010, 12, 12),
 #    # A url to the source of the data
 #    'href': 'http://www.cityofchicago.org/city/en/depts/doit/supp_info/gis_data.html',
 #    # Notes identifying any pecularities about the data, such as columns that were deleted or files which were merged
 #    'notes': '',
 #    # Encoding of the text fields in the shapefile, i.e. 'utf-8'. If this is left empty 'ascii' is assumed
 #    'encoding': ''
 #    # SRID of the geometry data in the shapefile if it can not be inferred from an accompanying .prj file
 #    # This is normally not necessary and can be left undefined or set to an empty string to maintain the default behavior
 #    #'srid': ''
 #},
 'Cities': {
     'file': 'DCBndyPly/DCGIS_DCBndyPly.shp',
     'singular': 'City',
     'kind_first': False,
     'ider': utils.simple_namer(['CITY_NAME']),
     'namer': utils.simple_namer(['CITY_NAME']),
     'authority': 'DC Office of the Chief Technology Officer',
     'domain': 'Washington, DC',
     'last_updated': date(2011, 3, 2),
     'href': 'http://data.dc.gov/Metadata.aspx?id=74',
     'notes': '',
     'encoding': '',
 },
 'Wards': {
     'file': 'Ward02Ply/Ward02Ply.shp',
     'singular': 'Ward',
     'kind_first': True,
     'ider': utils.simple_namer(['WARD_ID']),
     'namer': utils.simple_namer(['WARD_ID']),
     'authority': 'DC Office of the Chief Technology Officer',
from django.contrib.humanize.templatetags.humanize import ordinal

import utils

SHAPEFILES = {
    # This key should be the plural name of the boundaries in this set
    'City Council Districts': {
        # Path to a shapefile, relative to /data/shapefiles
        'file': 'city_council_districts/Council Districts.shp',
        # Generic singular name for an boundary of from this set
        'singular': 'City Council District',
        # Should the singular name come first when creating canonical identifiers for this set?
        'kind_first': False,
        # Function which each feature wall be passed to in order to extract its "external_id" property
        # The utils module contains several generic functions for doing this
        'ider': utils.simple_namer(['DISTRICT']),
        # Function which each feature will be passed to in order to extract its "name" property
        'namer': utils.simple_namer(['NAME']),
        # Authority that is responsible for the accuracy of this data
        'authority': 'Tyler GIS Department',
        # Geographic extents which the boundary set encompasses
        'domain': 'Tyler',
        # Last time the source was checked for new data
        'last_updated': date(2011, 5, 14),
        # A url to the source of the data
        'href': 'http://www.smithcountymapsite.org/webshare/data.html',
        # Notes identifying any pecularities about the data, such as columns that were deleted or files which were merged
        'notes': '',
        # Encoding of the text fields in the shapefile, i.e. 'utf-8'. If this is left empty 'ascii' is assumed
        'encoding': '',
        # SRID of the geometry data in the shapefile if it can not be inferred from an accompanying .prj file
Exemplo n.º 10
0
    so we need to get just the first part of that.
    """
    if "_" in name:
        return name.split('_')[0]
    else:
        return name


# This SHAPEFILES dictionary is a sample. You should delete (or comment out)
# the first entry if you don't care about neighborhoods in Chicago.
SHAPEFILES = {
    'Wards': {
        'file': 'Ward02Ply/Ward02Ply.shp',
        'singular': 'Ward',
        'kind_first': True,
        'ider': utils.simple_namer(['WARD_ID']),
        'namer': utils.simple_namer(['WARD_ID']),
        'authority': 'DC Office of the Chief Technology Officer',
        'domain': 'Washington, DC',
        'last_updated': date(2011, 2, 26),
        'href': 'http://data.dc.gov/Metadata.aspx?id=126',
        'notes': '',
        'encoding': '',
    },
    'Neighborhood Clusters': {
        'file': 'NbhClusPly/NbhClusPly.shp',
        'singular': 'Neighborhood Cluster',
        'kind_first': False,
        'ider': utils.simple_namer(['GIS_ID']),
        'namer': utils.simple_namer(['NBH_NAMES']),
        'authority': 'DC Office of the Chief Technology Officer',
Exemplo n.º 11
0
 #     'kind_first': False,
 #     'ider': utils.simple_namer(['OBJECTID']),
 #     'namer': utils.simple_namer(['PropAddCom']),
 #     'authority': 'Wayne County',
 #     'domain': 'Detroit',
 #     'last_updated': date(2010, 12, 12),
 #     'href': 'http://www.example.com',
 #     'notes': '',
 #     'encoding': ''
 # },
  
  'Planning Clusters': {
      'file': 'clusters/Clusters.shp',
      'singular': 'Cluster',
      'kind_first': False,
      'ider': utils.simple_namer(['CLUSTER']),
      'namer': utils.simple_namer(['CLUSTER']),
      'authority': 'City of Detroit',
      'domain': 'Detroit',
      'last_updated': date(2010, 12, 12),
      'href': 'http://www.example.com',
      'notes': '',
      'encoding': ''
  },
  
  'Neighborhoods': {
      'file': 'neighborhoods/Neighborhoods.shp',
      'singular': 'Neighborhood',
      'kind_first': False,
      'ider': utils.simple_namer(['NHOOD']),
      'namer': utils.simple_namer(['NHOOD']),