Page 26 of 171

Biss gives a short speech about good city-building policies

Transcript (I wrote this):

“We need the right land use policies, so around things like parking minimums, which are catastrophic, around things like height rules around transit nodes, around things like the way that bike lanes operate, and the design of roads that kind of allow for 35 mph and not 25 mph…all that stuff that we know is a disincentive to walking and cycling, is embedded in our municipal land use policies.

“What the state should do is not just increase investment in mass transit, but then condition that investment on municipal polices that encourage the kind of mixed-use development, transit-oriented development, walkability, bikeability.

“If you do that, if you have state dollars tied to these policies, you can change municipal polices across the state, and then you can have a real revolution in walkability and bikeability.”

Need help voting? Check out my crowdsourced voting guide for friends!

Don’t know who to vote for? Start your research using my friends voter guide!

Friends voter guide

Anyone can read it and comment, only the invited few can edit. If you would like to make some edits, ask for an invitation.

The primary election is on March 20, but early voting in Cook County has begun. Anyone registered in Cook County can vote early at multiple sites, including the downtown hub at 16 W Adams. Voting here is quick because they have so many voting booths.

Get all the other details on early voting.

New Illinois bill would prevent government employees from being paid to attend conferences

The American Planning Association, Illinois chapter, sent out a legislation alert this morning about three bills that would prevent government funds from being used to send employees to conferences.

I wrote the following letter to my two state representatives.

—-

Dear Representative Soto and Illinois Senator Aquino,

I urge you to vote no on the bills HB4246, HB4247, and HB4248 (“bills”).

I am a professional urban planner in Humboldt Park who hopes to have a job with a government agency in Chicago very soon (I’ve applied three times to the same agency, because I want to work there so badly). I have many colleagues, friends, and fellow UIC alumni, who currently work for government agencies in Illinois.

These bills will ban government employees from attending conferences, which is important to government and to these employees for 3 reasons:

1. It’s an opportunity for the worker to learn the latest knowledge, technology, and practices for their line of work. Government agencies should have high quality workers and staying abreast of new ideas in their field is paramount to a high quality government agency.
2. It’s an opportunity for the government agency to share the results of their internal work with a wider audience, gain recognition, and share and receive best practices from other government agencies.
3. Workers who are certified in their respective industries must attend events to receive “continuing education” credits to ensure they can keep their certification. If the employer isn’t paying for this, then the employee is encouraged to find a job elsewhere that will.

I understand that there seems to have been some abuse, at least from what I’ve read in the news about Governor Rauner’s head of the IT department, but these bills are an overbearing and potentially damaging way to deal with that problem.

Sincerely,
Steven Vance

The genius of using ST_Subdivide to speed up PostGIS intersection comparisons

You should use ST_Subdivide to break up large shapes into smaller ones

This infographic visually compares the difference between running a PostGIS comparison query like ST_Intersects on a large shape versus a subdivided version of that large shape. Click to embiggen.

Hundreds of GIS intersection comparisons are completed every hour on Chicago Cityscape.*

People are looking at, say, a map of the South Shore community area. That “Place” page then grabs all of the building permits, building violations, business licenses, and other “feature layers” that are stored as points.

A classic “point in polygon” comparison is made using the ST_Intersects(place_geometry, permits_geometry) function.

This has worked very well for several years.

The problem

But as Chicago Cityscape handles larger shapes – they come from users drawing their own, large shapes, and from large shapes like the downtown Chicago area – this query doesn’t cut it.

Setting indexes on the geometry is imperative, but it’s not the end of the to optimize performance. That’s because the index of the geometry is a rectangular bounding box (which is also called an “envelope” in GIS) that contains the entire shape of the South Shore community area.

The downtown Chicago area, however, is not even the largest shape I have. That belongs to the new Place, “Neighborhood Opportunity Fund investment zones” (NOF). Combined, they cover 75 square miles of Chicago. Downtown is only 7.7 square miles.

After I added the NOF map and tested its Place page, it “crashed” my server, metaphorically speaking. The query to just count the number of building permits in the area would take about five minutes.

There had to be a better way; in the meantime, however, I divided the NOF map into the West and South sections. This hardly improved the counting time.

The solution

Thankfully, today, I saw a tweet from Paul Ramsey linking to his blog that linked to his slides from a recent presentation about the use of PostgreSQL to store and manipulate GIS data.

In it he explained how the ST_Subdividefunction worked. I’m going to demonstrate it using graphics from my own maps.

A normal intersection comparison, using ST_Intersects(place_geometry, permits_geometry) in a query creates a bounding box (envelope) around each geometry and quickly determines whether the two envelopes overlap. If they do, then it checks again to see if the actual geometries overlap. If they do, that data is returned as a response to your query.

When your two datasets are massive, like the NOF zones, which collectively cover 1/3rd of Chicago, and the building permits, which are found across the entire city…well, that led to the five minutes counting time.

Enter ST_Subdivide. To use it properly you would run it against your existing geometry and store the much smaller shapes, derived from the big shape, in a new table. I applied the function to all the 22,203 maps that Chicago Cityscape has and stored their unique IDs and subdivided geometries in a new “lookup” table.

Now, any time I want to compare the building permits against the NOF, the building permits are instead compared to the small shapes that were subdivided.

The query

Chicago Cityscape uses a single table (created as a materialized view) to combine all 22,203 maps. Each map is stored in a source table (for example, there’s a table to hold the 77 community areas) and the materialized view runs once a day to combine all of the maps in the source tables. This ensures our data is managed well: different source tables can hold different information, and the single table holds only the name, type, and geometry of the source tables, for faster comparison. Each entry in the single table also has a “slug”, its unique identifier.

Thus, the materialized view of the subdivided maps is created from the aforementioned single table, using this query:

create materialized view view_places_subdivided as
select gid || '_' || random() as gid, slug, st_subdivide(geom) as geom
from view_places;

The “gid” is designed to create a new unique ID field, as the slug field will be repeated for every subdivided of each map. A unique ID field is necessary if you want to refresh the materialized view concurrently (to allow for other queries to access the materialized view while it’s being refreshed).

* The results are cached for a few hours, because the feature layers change 1-2 times per day and at different times each day, so the limited duration cache accommodates that. Ideally I would code a way to invalidate the cache when the feature layer data is updated.

Update 12/31/19: ST_Subdivide will fail if your geometries have any or certain geometry errors (I don’t know if it’s any kind of error, or certain kinds of errors that make the function fail). Chicago Cityscape has over 37,000 features that ST_Subdivide is attempting to process, and there is a lot of room for error in managing that many features from dozens of sources.

Upzone the 606

Map of the single family-only zoning around the Bloomingdale Trail

The area in green only allows single-family houses to be built.

Something’s gotta give.

This is all of the land area within two blocks of the Bloomingdale Trail that allows only single-family housing to be built (view full map). This isn’t to say that multi-family housing doesn’t exist here; it definitely does, and there’s probably a handful of two-flats on a majority of the blogs.

All of the five parks of the 606 are within this two block radius, and 49.6 percent of the land allows only single-family housing to be built.

But why build a transportation corridor, a park, a new, expensive, public amenity, and not change the kind of housing – which often determines the kind of family and makeup of a household – that can afford to buy a home near here.

It’s already been shown that detached single-family housing prices have grown intensely the closer you get to the trail. That price growth has meant displacement for some, and “no chance to buy or build a house here” for many others.

There are still plenty of vacant lots within the mapped area; lots that should have a 2-4 unit building built on them, but where only a 1-unit building is allowed.

This map was made possible by the new Zoning Assessment tool on Chicago Cityscape. Read about it or use it now.