Skip to content

Instantly share code, notes, and snippets.

View BishopGIS's full-sized avatar

Dmitry Baryshnikov BishopGIS

  • NextGIS
  • Russia, Moscow
View GitHub Profile
@BishopGIS
BishopGIS / err.log
Created September 4, 2019 07:46
geoserver wms
Uncaught UnicodeEncodeError at http://0.0.0.0:8080/api/component/render/image?resource=5&extent=9400684.360680686,6659270.34123284,9626326.468178527,6800984.591673557&size=1476,927
app_1 | Traceback (most recent call last):
app_1 | File "/opt/ngw/package/nextgisweb/nextgisweb/pyramid/exception.py", line 76, in unhandled_exception_tween
app_1 | return handler(request)
app_1 | File "/opt/ngw/package/nextgisweb/nextgisweb/pyramid/exception.py", line 66, in handled_exception_tween
app_1 | reraise(*exc_info)
app_1 | File "/opt/ngw/package/nextgisweb/nextgisweb/pyramid/exception.py", line 42, in handled_exception_tween
app_1 | response = handler(request)
app_1 | File "/usr/local/lib/python2.7/dist-packages/pyramid_tm/__init__.py", line 171, in tm_tween
app_1 | reraise(*exc_info)
@BishopGIS
BishopGIS / response
Last active August 5, 2019 10:31
api response
{
"features": [
{
"attrs": {
"address": "г. Москва, ул. Озерная, вл. 49, стр. 1",
"cn": "77:07:0014004:7068",
"id": "77:7:14004:7068"
},
"center": {
"x": 4168166.7754504266,
@BishopGIS
BishopGIS / srs.py
Last active June 5, 2019 08:09
example import of MI and ESRI proj
from osgeo import osr
srs = osr.SpatialReference()
line1 = 'PROJCS["MSK90 zone 6",GEOGCS["MSK90",DATUM["Pulkovo_1942",SPHEROID["Krassowsky 1940",6378245,298.3],TOWGS84[23.92,-141.27,-80.9,-0,0.35,0.82,-0.12]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433]],UNIT["metre",1],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",32.5],PARAMETER["scale_factor",1],PARAMETER["false_easting",6300000],PARAMETER["false_northing",-9214.70],AXIS["X",NORTH],AXIS["Y",EAST]]'
#line2 = '"МСК-23 зона 1", 8, 1001, 7, 37.98333333333, 0, 1, 1300000, -4511057.628'
line2 = 'Earth Projection 8, 1001, "m", 37.98333333333, 0, 1, 1300000, -4511057.628, 0'
srs.ImportFromMICoordSys(line2)
@BishopGIS
BishopGIS / collector.log
Created April 27, 2019 20:51
collector start log
$ docker-compose up
WARNING: Some services (backup, collector-hub, collector-hub-db) use the 'deploy' key, which will be ignored. Compose does not support 'deploy' configuration - use `docker stack deploy` to deploy to a swarm.
Creating network "nextgiscollector_hub_default" with the default driver
Creating volume "nextgiscollector_hub_postgres" with default driver
Creating volume "nextgiscollector_hub_backup" with default driver
Creating nextgiscollector_hub_collector-hub-db_1 ... done
Creating nextgiscollector_hub_backup_1 ... done
Creating nextgiscollector_hub_collector-hub_1 ... done
Attaching to nextgiscollector_hub_collector-hub-db_1, nextgiscollector_hub_collector-hub_1, nextgiscollector_hub_backup_1
collector-hub-db_1 | The files belonging to this database system will be owned by user "postgres".
@BishopGIS
BishopGIS / error.log
Created April 23, 2019 23:47
ngw qgis rendering error
Traceback (most recent call last):
File "/opt/ngw/env/local/lib/python2.7/site-packages/pyramid/router.py", line 270, in __call__
response = self.execution_policy(environ, self)
File "/opt/ngw/env/local/lib/python2.7/site-packages/pyramid/router.py", line 279, in default_execution_policy
return request.invoke_exception_view(reraise=True)
File "/opt/ngw/env/local/lib/python2.7/site-packages/pyramid/view.py", line 768, in invoke_exception_view
reraise_(*exc_info)
File "/opt/ngw/env/local/lib/python2.7/site-packages/pyramid/router.py", line 277, in default_execution_policy
return router.invoke_request(request)
File "/opt/ngw/env/local/lib/python2.7/site-packages/pyramid/router.py", line 249, in invoke_request
@BishopGIS
BishopGIS / test_history.py
Created March 14, 2019 20:54
Test NGW history
# -*- coding: utf-8 -*-
import sys
from osgeo import gdal
from osgeo import ogr
import requests
import json
import datetime
from time import sleep
@BishopGIS
BishopGIS / 1.json
Created March 1, 2019 08:07
test web map
{
"resource": {
"id": 1,
"cls": "webmap",
"creation_date": "2019-02-04T08:56:58.275690",
"parent": {
"id": 0,
"parent": {
"id": null
}
@BishopGIS
BishopGIS / vrt_debug
Created November 8, 2018 11:01
VRT Debug output
GDAL: GDALOpen(/Volumes/Data/work/testgeodata/raster/vrt/test.vrt, this=0x7ffab4b2ed10) succeeds as VRT.
GDAL: GDALDefaultOverviews::OverviewScan()
VSICURL: Effective URL: https://satellogic-catalog.azureedge.net/production-scenes-catalog/satellogic/newsat5/2018/10/18/newsat5_micro_L1_2dfcab23129744dd91ea3b0717021534_0_5_66/newsat5_micro_L1_2dfcab23129744dd91ea3b0717021534_0_5_66_red.vrt/1540460931/newsat5_micro_L1_2dfcab23129744dd91ea3b0717021534_0_5_66_red.vrt?se=2018-11-08T11%3A09%3A48Z&sp=r&sv=2017-04-17&sr=b&sig=ZMMtFzPFa75vr1qfqJcJ5OYAVPlIaW9WkcbTUDEWhoU%3D
VSICURL: GetFileSize(https://telluric.satellogic.com/v2/scenes/newsat5_micro_L1_2dfcab23129744dd91ea3b0717021534_0_5_66/token/eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJwYXlsb2FkX3ZlcnNpb24iOiIxLjEiLCJhY3Rpb24iOiJkb3dubG9hZCIsInVzZXJuYW1lIjoiZ3V5ZCIsInJlc291cmNlIjp7InR5cGUiOiI8Y2xhc3MgJ3NjZW5lMi5tb2RlbHMuU2NlbmUnPiIsImlkIjo2NjY5MjN9LCJjb250ZXh0Ijp7ImZpbGVfbmFtZSI6Im5ld3NhdDVfbWljcm9fTDFfMmRmY2FiMjMxMjk3NDRkZDkxZWEzYjA3MTcwMjE1MzRfMF81XzY2X3JlZC52cnQifX0
#!/usr/bin/env python
# -*- coding: utf-8 -*-
################################################################################
##
## Project: History
## Author: Dmitry Baryshnikov <[email protected]>
## Copyright (c) 2017 NextGIS <[email protected]>
## License: GPL v.2
##
################################################################################
cmake_minimum_required(VERSION 2.8.8)
project(osrm-test)
set(BUILD_SHARED_LIBS ON CACHE BOOL "Build shared libs" FORCE)
set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake ${CMAKE_MODULE_PATH})
find_package(Boost REQUIRED)
find_package(LibOSRM REQUIRED)