Questions tagged [topojson]

TopoJSON is an extension of GeoJSON that encodes topology.

19 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
7
votes
0answers
1k views

Extract TopoJSON directly from PostGIS

I have a simple "region" table: id (TEXT), name (TEXT), geom (MULTIPOLYGON). Here's the query I can use to extract a GeoJSON FeatureCollection: SELECT row_to_json(fc) FROM ( SELECT '...
2
votes
0answers
51 views

Converting .gri to topojson

I am making client-end javascript-powered maps in the context of web development. I am not using gdal, which I gather is a special kind of rendering software. Data source site: http://www.diva-gis....
2
votes
0answers
148 views

GeoJSON<->TopoJSON roundtrip breaks leaflet on antimeridean

For Wikipedia, I'm writing a service that extracts polygons of a country by a given ID, simplifies them, and produces GeoJSON. The PostGIS query produces this GeoJSON: {"type":"MultiPolygon","...
2
votes
0answers
296 views

TopoGeometry commands with postgres are really slow

After messing around quite a while, I was finally able to get a topogeometry converted from my geometry table following the example of toTopoGeom. I have the topology extension, with a topology schema ...
2
votes
0answers
345 views

How to remove projection in terminal from .shp file with valid .prj available

I have .prj, .shp, .sbn, .sbx, .shx, .dbf files where the content of the .prj file is the following: PROJCS["S-JTSK_Krovak_East_North",GEOGCS["GCS_S_JTSK",DATUM["D_S_JTSK",SPHEROID["Bessel_1841",...
2
votes
0answers
132 views

Combine files in TopoJSON when one is simplified differently to the other

I have two .shp files, I am separately converting these to GeoJSON with ogr2ogr.exe and then combining the files with TopoJSON. Each file independently becomes a ~200kb topojson file, however the ...
2
votes
0answers
255 views

Stray horizontal lines after converting from GeoJSON to topojson

After converting a GeoJSON file to topojson, and loading the topojson into Leaflet, stray lines appear in the resulting map. Like this: What is causing this? If I view the GeoJSON, these stray lines ...
2
votes
0answers
388 views

Filtering a Topojson on server-side. Which part of topology I need?

I have a big Topojson which I want to avoid loading it at page load. Instead I would like to parse on server-side at user request, sending back chunks of this original Topojson to be ploted. So I ...
2
votes
1answer
220 views

How do I merge csv data into topojson file?

I have a file, Council_Districts.topojson, with the following structure: { type: 'Topology', arcs: [...], transform: {...}, objects: { Council_Districts_2016: { type: 'GeometryCollection', ...
1
vote
0answers
257 views

Reading topojson file in d3.js problem

The topojson file with my code shows only one propriety with one path,my topojson file looks like the sample . what I am doing wrong ? I dont know if the problem with the topojson or the code as this ...
1
vote
0answers
58 views

Keep name of Local Authority when converting KML to GeoJSON?

I am trying to convert this KML to GeoJSON. All I want to do is draw the map with D3 and as I hover over each local authority, have the name in a popup. I tried this online tool and it seems to ...
1
vote
0answers
70 views

Merging features by admin or sovereingt

I followed Mike Bostock's 'Let's Make a Map' tutorial to make a GeoJSON map of the EU starting from a 1:10M cultural admin0 shapefile from Natural Earth. The problem that I'm facing if that some of ...
0
votes
0answers
124 views

Custom SVG world map usable for react-simple-maps (topojson, d3-geo)?

A client has supplied a "custom" SVG containing a very detailed world map that includes id's for all countries. I'm not sure how "custom" it is. Is it at all possible to convert it to topojson, which ...
0
votes
0answers
24 views

TopoJSON: How to add external properties if there is nothing to map to?

The goal is to add external properties to a TopoJSON. I have succeeded in converting shapefiles from http://www.diva-gis.org/gdata for various countries into JSON files. I have also succeeded in down-...
0
votes
1answer
33 views

Confusion regarding topojson Polygon coordinates

I have a topojson file which represents a hexagon. A hexagon has 6 vertices, so I was expecting the arcs attribute of topojson file would contain 6 points, but it contains 7. I wanted to know why ...
0
votes
0answers
60 views

TopoJSON from PostgreSQL database

I already finish input and run all the GeoDjango code, it worked. But time after time my data got bigger and result in big size of GeoJSON. I used this code to read database from PostgreSQL (PostGIS) ...
0
votes
0answers
172 views

Converting TopoJSON data to GeoJSON using JavaScript in browser?

There are many articles about how convert GeoJSON to TopoJSON using JavaScript, but I could not find how to convert TopoJSON to GeoJSON in the browser. Response: Using http://d3js.org/topojson.v1....
0
votes
0answers
192 views

Using ordnance survey data to make a D3 map?

I would like to display a map of the UK Westminster Parliamentary Constituencies in D3 with a width of 980px. I have downloaded and extracted the ordnance survey ESRI shapefiles from here: https://...
-1
votes
1answer
34 views

Seeking TopoJSON map of Chinese provinces which includes Hong Kong, Macau and Taiwan?

I have a TopoJSON map of China which is working well in d3.js. However, it is essential that I add Hong Kong, Macau/Macao and Taiwan to the map, but they are not included in the TopoJSON file. I have ...