One task where GeoJSON falls down is simplification of a group of polygons with common boundaries, e.g. the 48 conterminous US states. If you start with a highly detailed set of polygons, you need to simplify them for practical display in an online map.
GeoJSON doesn't encode the fact that the boundary points are common between adjacent polygons. When you simplify those polygons, each one is handled separately, and you end up with "slivers" where the boundaries are misaligned:
TopoJSON solves this by encoding each such boundary only once. So when you simplify the polygons, they are all done together, and the same simplification applies to adjacent polygons. No more slivers!
Is this actually GeoJSON falling down, or decades of convention extended to JSON? Topology is great, but it is sidestepped by Shapefile/WKT/WKB/etc, in favor of independent primitives like POINT, LINE, POLYGON. If GeoJSON did not exist as a new JSON GIS data format encoding these primitives, TopoJSON would not have "replaced" it, due to the added mis-match with other non-topological formats.
From what I can tell, the top criticism of GeoJSON is the under-enforced winding order specification, and crossing the antemeridian.
Similarly, typical map APIs like the Google Maps API accept GeoJSON and not TopoJSON. I was not suggesting TopoJSON as a replacement for GeoJSON, but as a complement to it. With the tools on the TopoJSON GitHub, you can have GeoJSON input and output, but convert to TopoJSON for the simplification step to avoid the "slivers" problem.
GeoJSON is not TopoJSON. Saying that is "falling down" is like criticizing a zebra for not being a giraffe. GeoJSON is a mapping of the (non-topological) "simple features" model into JSON, full stop. It does that fine.
Yes, the same "slivers" problem occurs when you try to simplify features in any format that uses individual polygons, such as shapefiles or whatnot. That's the only case I was referring to.
I don't think I would trust a zebra or a giraffe for this task either.
I like TopoJSON and have used it in projects. But it's weird to set it up as opposition to GeoJSON. It's a complement. GeoJSON is a general data format meant to replace uses of ESRI Shapefiles and other complex formats. TopoJSON is more of a solution for a particular application need.
Is there much work developing or using TopoJSON these days? I haven't seen much about it in a few years.
To be clear, I'm not suggesting TopoJSON as an alternative to GeoJSON. I like GeoJSON and was loosely involved with the working group that created and updated its spec.
I'm just saying that for the specific task I mentioned GeoJSON or any format such as shapefiles that store polygons individually naturally leads to the "sliver" problem.
A nice processing pipeline is:
1. Convert GeoJSON to TopoJSON.
2. Run the simplification on the TopoJSON.
3. Convert the resulting TopoJSON back to GeoJSON.
The TopoJSON GitHub has tools for each of these steps.
The problem is simplification. Suppose two regions share a border with some nonlinear points a, b, c, d. Simplifying the polygon for the first region might yield a, b, d while the second yield a, c, d. This creates gaps or overlaps between the two regions.
But what is the border? Set the border to what it actually is, not a simplification of it. The state of Colorado is formally a 697 sided polygon, don't simplify it to a rectangle.
It depends on what purpose you are using the polygons. In an online map you need to simplify way down. Consider these Colorado maps at two different zoom levels:
Even the one zoomed in on the state appears to use maybe 15-20 vertices max.
In the second one, if I squint real hard I can just barely make out one slight dogleg on the western border and one on the south. And that is partly because I knew to look for them in the zoomed-in map.
If we use, say, the Census TIGER/Line boundary definitions for the states, we are probably talking about hundreds of thousands of vertices, perhaps millions. You won't be using those in an online map without simplifying.
This is not what OP is describing. It is very common to simplify objects for decreasing boundary objects by orders of magnitude. GeoJSON is missing correlation when you do that. Simplifying country objects from a GeoJSON source could lead to a gap between the country borders. So you either have poor representation or a longer pipeline to convert objects to an amenable object set. It also breaks idempotency in some regards.
To do the simplification, you detect shared borders, simplify and generate polygons again.
That doesn’t make topojson inherently superior. You can convert back and forth and for many applications geojson is easier to process.
Yes, you could write code to do that. Or use the utilities provided in the TopoJSON GitHub and let them do it for you: convert to TopoJSON, simplify, convert back to GeoJSON. They have already written all the code for you.
The Texas border with Mexico is formally down the centerline of the Rio Grande, even as the river moves (ignoring fiddly complications). Even if you could somehow take a perfect snapshot of it at a given time, you'd run into the coastline paradox when sampling it.
So don’t simplify the shapes on their own. Geojson is a storage and exchange format, you can still convert it to other formats if you want to modify it.
When I was a very young kid in Eugene, Oregon, we always kept a supply of Chet's Tamales in the freezer. They always had one black olive hidden somewhere in the middle. It wasn't just a tamale, it was a treasure hunt!
In first grade, we took a field trip to Chet's factory. It was so interesting to see how they made tamales in quantity–and they sent us each home with a free tamale.
Another Oregon treat is Tillamook cheese. My family went on one of their tours. They still offer tours today, but you are in a glassed-in area on the second floor overlooking the line. Back then, we got to walk right up to the vats of cheese curd. They trusted us (and instructed us!) to not poke our fingers in.
Much more recently, a friend who works at La Terra Fina in Union City, California took me on a private tour of their manufacturing plant. You may have seen LTF's quiches and dips at stores like Safeway and Costco, and private label versions at other stores.
I think they were making the Artichoke-Jalapeño dip that day. What struck me was the contrast between the first part of the production line and the rest. They start with huge blocks of cream cheese, industrial size cans of artichokes and jalapeños, and dump them into a giant mixer by hand.
Once a batch is mixed and gets a taste test, the rest of the line is high speed and highly automated. Plastic tubs come through and get the dip squirted into them, the plastic seal and top goes on, and then a labeling machine attaches each label.
Pro tip: If you like their dips, try them warm. My friend had not actually done this, so I asked Claude for a recipe:
---
One time a friend served some La Terra Fina dip warm at a party. I'd only had it cold before, and it was a revelation. I forgot to ask for his recipe, but I believe he warmed it in the oven for a while and then under the broiler for a bit to lightly brown the top. What would be a good temperature and time for the first step, assuming a typical shallow casserole pan?
---
La Terra Fina dips warm up beautifully — the cream cheese base gets silky and the flavors meld in a way cold just can't match.
For a shallow casserole dish, I'd suggest:
Oven step: 325°F for about 20–25 minutes. Low and slow is the move here — you want it heated through without the dairy breaking or getting grainy. A shallow dish speeds things up compared to a deep one, so check at 20 minutes. You're looking for it to be bubbling gently around the edges.
Broiler step: 2–4 minutes on high, watching closely. The top should get lightly golden with a few darker spots — that slight caramelization on the cheese and any onion bits is where the magic happens. Don't walk away during this part.
A few notes:
• Pull it from the fridge 15–20 minutes before baking if you can, so it's not stone cold going in
• The spinach artichoke and artichoke jalapeño varieties both do particularly well warm
• Serving with something sturdy (crostini, pita chips, thick tortilla chips) beats thin crackers when it's hot and scoopable
The broiler browning is really what elevates it — that textural contrast between the creamy interior and the slightly crispy top is what probably made it feel like a revelation.
Technologies: Python, Ruby, C, C++, C#, JavaScript, TypeScript, PowerShell, Flask, SQL, PostGIS, Shapely, Unity, Unreal Engine, multiple assembly/machine languages, Windows user code and kernel drivers, Google Maps and other map APIs, geographic and airspace data
Hi, I'm Michael Geary. I've programmed in many languages and environments over the years. Some of my current interests are:
• Developer experience. I love helping my fellow developers solve problems, and building tools to make their jobs easier and more enjoyable.
• Aviation and geographic data. For example, airspace and obstacle data importers for Wing; election results and voter information maps for Google; many interactive maps for other companies.
• Hardware interfacing. In a way, I am a "full stack" developer, but my stack may involve a front end to a piece of hardware rather than the cloud. I first got into programming via ham radio, so RF hardware remains an interest.
• Designing and building APIs. Too often an API is designed by exposing the internals of whatever system provides the API. My philosophy is the opposite: start with the apps. I like to build a series of sample apps before starting on the API. This way I can imagine what API will make those apps and others like them easy to build.
• Talk with users! I don't like to sit in a back room cranking out code. I want to make sure it's the right code for what my users need, and that it's easy to maintain and improve as we learn more about what they want.
I won't comment on the pick up / drop off situation, but another important scenario is right turns. In California, drivers are legally required to merge into the bike lane when making a right turn. This is for the safety of the bicyclists, to avoid the dreaded "right hook" collision.
Dylan Taylor, a beloved Menlo-Atherton High School football coach, was killed last year in one of these collisions:
(Scroll down to the comment by "T R" which describes better than the article itself what likely happened.)
Unfortunately, I've almost never seen a driver follow this law. Everyone studiously avoids the bike lane and then cuts across it.
The bike lane marker changes from a solid white stripe to a dashed line as you approach an intersection. This is supposed to be a hint to merge into the bike lane. It isn't working.
I post a reminder on Nextdoor once or twice a year about this. I'm taking the opportunity to also post it here for my California neighbors.
It would be interesting to see if the Waymo Driver follows this law. My bet is that it does.
The San Francisco Bike Coalition has an excellent page on this topic:
Bike lane or not, the majority of drivers make illegal right turns.
If you're in SF, watch on Gough or Franklin that people don't pull in the far right or left lane to make a turn, they illegally turn from one lane over. Literally 9 of 10 cars do this.
It happens all over. My guess is they don't perceive it as a right lane because 100-200 feet back there were cars parked in it but it's clearly marked as a lane and the law makes it clearly illegal to make right turn if you're not in the right lane.
There's lots of other less illegal? but dangerous things 95% of drivers do. 2 left turn lanes, curved line drawn through intersection to guide the lanes. 95% of cars in the 2nd left turn lane cut the guide line effectively cutting off the people in the #1 left turn lane.
In the nearest fairly large city, there's a (sometimes separated) bike lane, a bus lane, traffic lane, and turning lane which all intersect to various degrees. It's all clear as mud especially after dark when both bicycles and pedestrians are frequently darting into traffic from behind cars without lights. I'm just surprised there aren't more accidents.
As soon as I saw that headline I knew it had to be on Middlefield... lo and behold. I've been aalmost hit there twice and actually hit there once. once with a car taking a left. another with a car taking a right
huh i didn't know about a specific bike lane law. but i do know the law that right turns must be taken as "close as practicable" to the right side of the roadway. plus there's the hint of the dashed line. Sneaking into the extra space to the right isn't a shortcut -- it's required by law, ie even without a bike lane.
in california, which is where the incident in TFA occurred.
People will do this to cut past people stopped at the light, but yes: at least in non-SF Bay Area, they will right hook unless otherwise compelled to put their car over the line. Some areas have started making those lanes dashed-striped but adherence is pitiful and enforcement is zero.
Yes, that's why, unless it is a parent-child duo, almost every cyclists duo I see everyday keeps riding side by side and now I can't even legally overtake even when I go (as I should) fully to other lane as I am supposed to keep 2M distance from them.
Look, I have a bicycle that I love riding. I have nothing against bicycles. But (primary transport) bicyclists are, in general, AHs.
Given the sheer amount of cyclist who think that cars should be banned with no consideration for anything else, I think that this is a common observation.
Where I live, the pro-cyclist mayor (whose husband owns a bike rental shop, by pure coincidence) closed a road for cars without consultation, now the firemen along with residents are protesting because emergency and delivery vehicles can't access a large part of the city (car parked can't get out!). This is the average behavior you can expect from militant cyclists, from my experience.
Riga. Of course, all of the cyclist absolutely LOVE it, and now want to remove cobblestones, which could lead to a removal of the city from the UNESCO World Heritage list. But they don't care.
Based on the photo, it looks like it’s pretty easily rectified by emergency bollards that can be lifted / lowered by emergency crews, though those may be expensive to procure.
I can kinda understand why ChatGPT and other chat bots do it. It's a chat interface. Most people chat with single line prompts.
Next door and social media apps, to answer your question, I'm sure a PM somewhere was able to prove that engagement increased if we let people share their thoughts immediately, and the PM got a tidy bonus because of this.
I would be OK if they put a checkbox next to the text input that let me choose whether enter sends or line breaks. I would be OK even if that lived in session storage, to remove the friction of a new Db column. Just give us the option!
GeoJSON doesn't encode the fact that the boundary points are common between adjacent polygons. When you simplify those polygons, each one is handled separately, and you end up with "slivers" where the boundaries are misaligned:
https://www.bing.com/images/search?q=map+slivers+betwen+poly...
TopoJSON solves this by encoding each such boundary only once. So when you simplify the polygons, they are all done together, and the same simplification applies to adjacent polygons. No more slivers!
https://github.com/topojson/topojson
https://github.com/topojson/topojson-simplify
reply