Giter VIP home page Giter VIP logo

pkk.js's Introduction

pkk.js

Build Status npm npm npm bundle size

JavaScript Client for Public Cadastral Map (pkk5.rosreestr.ru)

Install

npm install pkk

Usage

import PKK, { FEATURE_TYPES } from 'pkk';

const pkk = new PKK();

pkk
  .queryFeatures(
    FEATURE_TYPES.LAND_PLOT,
    { lng: 37.629, lat: 55.7252 },
    { tolerance: 100, limit: 12 }
  )
  .then((features) => {
    const feature = features[0];
    const featureInfo = pkk.getFeatureInfo(FEATURE_TYPES.LAND_PLOT, feature.attrs.id);
    return featureInfo;
  })
  .then((featureInfo) => {
    console.log(pkk.formatFeatureInfo(featureInfo));
  });

API

Table of Contents

PKK

PKK API Client

Parameters

  • config Object client config (optional, default defaultConfig)
    • config.baseURL String PKK base URL (optional, default 'https://pkk5.rosreestr.ru/')
    • config.featuresURL String PKK features API URL (optional, default '/api/features/')
    • config.referer (Boolean | String) referer header (optional, default false)
    • config.lang String i18n language (optional, default 'ru')

queryFeatures

Query PKK features near point

Parameters
  • typeId Number feature type id
  • lnglat Object longitude and latitude
  • options Object query options (optional, default {tolerance:100,limit:12})
    • options.tolerance Number query tolerance
    • options.limit Number features query limit
Examples
import PKK, { FEATURE_TYPES } from 'pkk';

const pkk = new PKK();

pkk.queryFeatures(
  FEATURE_TYPES.LAND_LOT,
  { lng: 37.629, lat: 55.7252 },
  { tolerance: 100, limit: 12 }
).then((features) => {
  console.log(features);
});

Returns Promise<Array<Feature>> response

getFeatureInfo

Query PKK feature info

Parameters
Examples
import PKK, { FEATURE_TYPES } from 'pkk';

const pkk = new PKK();

pkk.getFeatureInfo(FEATURE_TYPES.LAND_LOT, '77:1:1013:4985')
  .then((featureInfo) => {
    console.log(featureInfo);
  });

Returns Promise<Feature> response

formatFeatureInfo

Formats feature info with i18n labels

Parameters
  • featureInfo Object feature info (optional, default {})
Examples
import PKK, { FEATURE_TYPES } from 'pkk';

const pkk = new PKK();

pkk.getFeatureInfo(FEATURE_TYPES.LAND_LOT, '77:1:1013:4985')
  .then((featureInfo) => {
    console.log(pkk.formatFeatureInfo(featureInfo));
  });

Returns Object featureInfo translated feature info

Feature

Объект

Type: Object

Properties

FeatureAttributes

Cписок атрибутов

Type: Object

Properties

  • id String Идентификатор
  • cn String Кадастровый номер
  • statecd String Статус
  • address String Адрес
  • kladr String Код КЛАДР
  • fp String Форма собственности
  • adate String Дата выгрузки сведений из ГКН
  • anno_text String Надпись на карте
  • area_type String Тип площади
  • area_unit String Единицы измерения площади
  • area_value String Декларированная площадь
  • cad_cost String Кадастровая стоимость
  • cad_eng_data String Кадастровый инженер
  • cad_record_date String Дата изменения сведений в ГКН
  • cad_unit String Единицы измерения стоимости
  • category_type String Категория земель
  • date_cost String Дата внесения кадастровой стоимости
  • date_create String Дата постановки на учет
  • kvartal_cn String Кадастровый номер квартала
  • kvartal String Квартал
  • okrug_cn String Кадастровый номер округа
  • okrug String Округ
  • pubdate String Дата опубликования на ПКК
  • rayon_cn String Кадастровый номер района
  • rayon String Район
  • reg String Номер субъекта
  • rifr_cnt String Контактное лицо
  • rifr_dep String Орган власти
  • rifr String Свободен от прав третьих лиц
  • rights_reg String Зарегистрированы права (да/нет)
  • sale_cnt String Контактное лицо
  • sale_date String Дата проведения торгов
  • sale_dep String Орган власти
  • sale_price String Начальная цена
  • sale String Принято решение о проведении торгов
  • util_by_doc String Разрешенное использование по документу
  • util_code String Разрешенное использование
  • cc_date_approval String Дата утверждения категории земель

FEATURE_TYPES

Типы объектов

Type: Object

Properties

  • LAND_LOT number Земельные участки (1)
  • LAND_QUARTER number Кварталы (2)
  • LAND_AREA number Районы (3)
  • LAND_DISTRICT number Округи (4)
  • CCO number ОКСы (5)
  • TERRITORIAL_AREA number Территориальные зоны (6)
  • BOUNDARY number Границы (7)
  • BOUNDARY_REFERENCE_NETWORK number ОМС (9)
  • USE_RESTRICTED_ZONE number ЗОУИТы (10)
  • FORESTRY number Лесничества и лесопарки (12)
  • BUILDING_LINE number Красные линии (13)
  • LAND_LOT_LAYOUT number Схемы расположения ЗУ (15)
  • FREE_ECONOMIC_ZONE number Свободные экономические зоны (16)

pkk.js's People

Contributors

stepankuzmin avatar dependabot[bot] avatar

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.