The Author Online Book Forums are Moving

The Author Online Book Forums will soon redirect to Manning's liveBook and liveVideo. All book forum content will migrate to liveBook's discussion forum and all video forum content will migrate to liveVideo. Log in to liveBook or liveVideo with your Manning credentials to join the discussion!

Thank you for your engagement in the AoF over the years! We look forward to offering you a more enhanced forum experience.


Finally, there is a workaround of the problem. The issue appears when the locale
is set something different than en-US. So change the setting in Control Panel>Regional and Language Options>Advanced to English(United States) and the text with normal font size will be displayed.


The font size is extremely small in the Query window of Run Datastore Query. As far as I remember, there is a process to fix it, but I have not found anything about on the net.
Can anybody help?

Thanks indeed:

After having imported data with shp2pgsql, I found apparently empty fields in the geom column. The same applies to the us.states table when the transformation, simplification,etc. have been done. OpenJump renders flawless maps from both tables and queries for checking the area, geometry type etc. of the geom column return
valid values for the empty fields as well. What is the reason of this?
All jokes are funny for a newborn...smilie
Thanks, anyway.
Listing 5.8 Which geometries cross?
SELECT A.ex_name As a_name, B.ex_name As b_name,
ST_Touches(A.the_geom, B.the_geom) As a_tou_b,
ST_Contains(A.the_geom, B.the_geom) As a_co_b
FROM example_set As A CROSS JOIN example_set As B
WHERE ST_Touches(A.the_geom, B.the_geom) ;

Hi Leo and Regina,

I downloaded data from the web sites directly, myself. My comment applies for that and by no means for your data set which I have not known about...
Sorry, and please ignore my last words then.


I suspect the ar_num attribute must be involved into the command for starting the dynamic trigger example and should be read something like:
INSERT INTO,ar_num, geom, tags)
SELECT osm_id,ar_num, geom, tags FROM ch03.paris_hetero;

There is a reference of NEW.ar_num in the trigger function (listing 3.11), that does not have any value otherwise, and keeps throwing error messages.

Also, I have to remark the data from OpenStreetMap and GeoCommon web sites for the Paris area proved to be topologically incorrect that made very difficult to go through this chapter. It may be considered to attach tested data as well...

Appendix C.

SELECT c.last_name, c.first_name, r.rental_id, p.amount, p.payment_date
FROM customer As C
INNER JOIN rental As r ON C.customer_id = r.customer_id
LEFT JOIN payment As p
ON (p.customer_id = r.customer_id AND p.rental_id r.customer_id);

Well, AND requires boolean data types on both sides.
I guess, neither p.rental_id nor r.customer_id are boolean values, so something must be missing here...
Appendix C

SELECT p.product_name, s.state, p.base_price * (1 + As total_price
FROM products AS p
CROSS JOIN state AS s;
-- 1 Can also be written as

SELECT p.product_name, s.state,p.base_price * (1 + As total_price
FROM products AS p, state AS s

...added the part in bold still is necessary...
Chapter 7.

ogr2ogr -f "MapInfo file" /gisdata/ PG:"host=localhost user=postgres port=5432 dbname=postgis_in_action password=mypassword" –select "SELECT track_seg_point_id, ele, time" -where "time BETWEEN '2009-07-18 04:33-04' AND '2009-07-18 04:34-04'" staging.aus_biketrip_narangba

SELECT in bold is needless and the same applies to the similar KML example as well.
After correcting the select surplus, the script was not still operating, I suppose because of the format of timestamps, but I did not have more time to play with it.
Appendix C.

SELECT n.nei_name,
SUM(ST_Length(road.the_geom)) as total_road_length,
ST_Extent(road.the_geom) As total_extent,
COUNT(DISTINCT road.road_name) As count_of_roads
FROM neighborhoods As n
ST_Intersects(neighborhoods.the_geom, roads.the_geom)
WHERE = 'Boston'
GROUP BY n.nei_name
HAVING ST_Area(ST_Extent(road.the_geom)) > 1000;

the table names underlined in the code should be roads...
After the code in listing 5.12:

There are three import things about using DISTINCT ON.

maybe important?
Example in App.C.

SELECT c.city_name
FROM city As c
LEFT JOIN airports As a ON a.city_code=c.city_code
WHERE a.airport_code IS NULL;

text in bold is missing from the code