npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

pkk

v0.2.1

Published

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

Downloads

17

Readme

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)