Skip to content

Instantly share code, notes, and snippets.

@kikitte
kikitte / register_glm_as_boost_geometry.h
Created May 2, 2025 09:45
defining multiple geometry types based on glm vector
#pragma once
#include <type_traits>
#define GLM_FORCE_XYZW_ONLY
#include <glm/vec2.hpp>
#include <glm/vec3.hpp>
#include <boost/geometry/core/cs.hpp>
#include <boost/geometry/geometries/point.hpp>
@kikitte
kikitte / qgis-pycharm.bat
Created March 7, 2025 15:06
using pyqgis in pycharm
@echo off
SET OSGEO4W_ROOT=C:\Program Files\QGIS 3.40.4
call "%~dp0\o4w_env.bat"
@echo off
path %OSGEO4W_ROOT%\apps\qgis-ltr\bin;%PATH%
set QGIS_PREFIX_PATH=%OSGEO4W_ROOT:\=/%/apps/qgis-ltr
set GDAL_FILENAME_IS_UTF8=YES
rem Set VSI cache to be used as buffer, see #6448
set VSI_CACHE=TRUE
set VSI_CACHE_SIZE=1000000
@kikitte
kikitte / fill_poly_v2i_n.c
Created May 24, 2022 01:19 — forked from ideasman42/fill_poly_v2i_n.c
Raster poly-filling by Darel Rex Finley, optimized by Campbell Barton.
/* C99, public domain licensed */
#include <limits.h>
#include <stdbool.h>
#include <math.h>
/* utilities */
#define SWAP(type, a, b) do { \
type sw_ap; \
@kikitte
kikitte / gist:5b50c13afb55286791f4d5d62e9a2ed9
Created May 16, 2021 08:04
Flow / Unfloaw all people on github page
Open chrome devtools and paste this code, and run it.
@kikitte
kikitte / gist:c07fd49b3f1a2cdd173d1cd83c8f856e
Last active July 27, 2023 14:35
常用计算几何算法
整理一下工作学习中用到的计算几何算法,大多使用JavaScript实现。