Online conversion between geometric formats

Here is a simple conversion tool between different text representations for 2D geometry objects. Supported formats are: WKB, a.k.a. Well-Known Binary, in hexadecimal format WKT, a.k.a. Well-Known Text GeoJSON A few sample geometries (taken from Wikipedia) are available: POINT LINESTRING POLYGON MULTIPOINT MULTILINESTRING MULTIPOLYGON GEOMETRYCOLLECTION This tool uses the wkx javascript library for parsing. Have … Read more

Conversion between “CamelCase” and “snake_case” strings with Python


In some programs, it might be needed to convert strings between CamelCase, camelBack and snake_case notations. Here are a few function to perform these operations: import re     def snake2camel(name): return re.sub(r'(?:^|_)([a-z])’, lambda x:, name)   def snake2camelback(name): return re.sub(r’_([a-z])’, lambda x:, name)   def camel2snake(name): return name[0].lower() + re.sub(r'(?!^)[A-Z]’, lambda x: … Read more