GithubHelp home page GithubHelp logo

address-api-new-version-archive's Introduction

The system will allow people to query information about one or more addresses.

The system will store the following information for an address/parcel:

  • Identifiers that other systems use to identify the address/parcel, KIVA PIN, County APN
  • Attributes of an address/parcel such as Census Tract, City Council District ...
  • Data about an address/parcel, amount paid in taxes, ...

It is intended to answer the following:

  • Get a normalized standard address, for example "210 W 19th Ter, Kansas City, MO" standard address might be "210 West 19th Terrace, Kansas City, MO, 64108"
  • Return selected identifiers, attributes, and data related to one or more address. This will allow for other
  • Get a list of addresses within a radius of a coordinate or other boundary.

In addition with the data we collect for the above we can return other information such as:

  • All addresses in a census tract
  • Census tracts that are in a neighborhood

Having issue with CORS

address-api-new-version-archive's People

Contributors

zmon avatar

Watchers

 avatar  avatar  avatar

address-api-new-version-archive's Issues

Add City Council

https://maps.kcmo.org/kcgis/rest/services/external/DataLayers/MapServer/6

https://maps.kcmo.org/kcgis/rest/services/external/DataLayers/MapServer/6/query

#!/bin/sh

#
# Find the end point and get the data
#

#
# should be in 4326
#
curl 'https://maps.kcmo.org/kcgis/rest/services/external/DataLayers/MapServer/6/query?geometry=&geometryType=esriGeometryPolygon&inSR=&spatialRel=esriSpatialRelIntersects&relationParam=&objectIds=&where=1%3D1&time=&returnCountOnly=false&returnIdsOnly=false&returnGeometry=true&maxAllowableOffset=&outSR=4326&outFields=&f=pjson' > data.json


#
# Paul, great post on importing GeoJSON to Postgres: http://morphocode.com/using-ogr2ogr-convert-data-formats-geojson-postgis-esri-geodatabase-shapefiles/
# Ogr2ogr is the swiss-army knife when it comes to conversion of GIS data. Here are a few examples on how to convert data between GeoJSON, Shapefile, PostGIS.
#
# ogr2ogr -f "PostgreSQL" PG:"dbname=my_database user=postgres" "source_data.json" -nln destination_table
#

ogr2ogr -f "PostgreSQL" \
    PG:"dbname=c4kc_address_api user=postgres" \
    "data.json"  \
    -overwrite  \
    -nln tmp_city_councel
  • Get shape file KCNeighborhoods.zip

  • Load shape file into temporary table address_spatial.kc_nhood_tmp

    shp2pgsql -g geom \
     -I /var/wwwsites/address_api.codeforkc.org/data/KCNeighborhoods/KCNeighborhoods.shp \
     address_spatial.kc_nhood_tmp | psql  -d code4kc
    

    this results in

    
    
  • Create permanent table address_spatial.mo_kc_city_neighborhoods

    CREATE TABLE address_spatial.mo_kc_city_neighborhoods (
        gid integer NOT NULL,
        name character varying(62),
        geom geometry(MultiPolygon),
        CONSTRAINT pk_kcmo_nhood_gid PRIMARY KEY (gid)
    );
    
    CREATE INDEX idx_mo_kc_city_neighborhoods ON
      address_spatial.mo_kc_city_neighborhoods
    USING gist(geom);
    
  • Copy tmp table into permanent table

    INSERT INTO address_spatial.mo_kc_city_neighborhoods 
       (gid, name, geom) 
            SELECT gid, name, geom
                FROM address_spatial.kc_nhood_tmp;
    
  • Test

    SELECT name FROM address_spatial.mo_kc_city_neighborhoods
    WHERE ST_Intersects( ST_MakePoint( -94.5867908690, 39.0903343205), geom);
    
  • Add column to attributes table city_address_attributes

    \c address_api
    ALTER TABLE city_address_attributes
    ADD COLUMN nhood character varying(62);
    
  • Create query for GEOJSON based off of http://www.postgresonline.com/journal/archives/267-Creating-GeoJSON-Feature-Collections-with-JSON-and-PostGIS-functions.html

SELECT row_to_json(fc)
 FROM ( SELECT 'FeatureCollection' As type, array_to_json(array_agg(f)) As features
 FROM (SELECT 'Feature' As type
    , ST_AsGeoJSON(lg.geom)::json As geometry
    , row_to_json(lp) As properties
   FROM address_spatial.mo_kc_city_neighborhoods As lg
         INNER JOIN (SELECT gid, name FROM address_spatial.mo_kc_city_neighborhoods) As lp      
       ON lg.gid = lp.gid  ORDER BY lg.name) As f )  As fc;
  • Update index.php, the api program

How to handle data items that are not updated.

Example, I just updated the Neighborhood boundaries, that now include North of the river.
101,718 records were not updated. When we look at the history of one of the records that was not updated, what should the source be, this load, or the previous load that added it?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.