Project

General

Profile

« Previous | Next » 

Revision 10681

bugfix: inputs/VegBank/plot_/create.sql: need to join place.*plot_id* to plot.plot_id instead of plotplace_id. this is the cause of the "State is wrong, not Wyoming, but Tennessee" and "County is incorrect (not Powell, but Orange)" bugs in the VegBank spot-checking (wiki.vegpath.org/Spot-checking#Great-Smoky-Mountains-National-Park).

View differences:

create.sql
4 4
    FROM place
5 5
    JOIN namedplace USING (namedplace_id)
6 6
    WHERE
7
    place.plotplace_id = plot.plot_id
7
    place.plot_id = plot.plot_id
8 8
    AND placesystem = 'continent'
9 9
    LIMIT 1
10 10
    ) AS continent
......
12 12
    FROM place
13 13
    JOIN namedplace USING (namedplace_id)
14 14
    WHERE
15
    place.plotplace_id = plot.plot_id
15
    place.plot_id = plot.plot_id
16 16
    AND placesystem = 'area|country|territory'
17 17
    LIMIT 1
18 18
    ) AS "area|country|territory"
......
20 20
    FROM place
21 21
    JOIN namedplace USING (namedplace_id)
22 22
    WHERE
23
    place.plotplace_id = plot.plot_id
23
    place.plot_id = plot.plot_id
24 24
    AND placesystem = 'region|state|province'
25 25
    LIMIT 1
26 26
    ) AS "region|state|province"
......
28 28
    FROM place
29 29
    JOIN namedplace USING (namedplace_id)
30 30
    WHERE
31
    place.plotplace_id = plot.plot_id
31
    place.plot_id = plot.plot_id
32 32
    AND placesystem = 'county'
33 33
    LIMIT 1
34 34
    ) AS county
......
36 36
    FROM place
37 37
    JOIN namedplace USING (namedplace_id)
38 38
    WHERE
39
    place.plotplace_id = plot.plot_id
39
    place.plot_id = plot.plot_id
40 40
    AND placesystem = 'quadrangle'
41 41
    LIMIT 1
42 42
    ) AS quadrangle
......
44 44
    FROM place
45 45
    JOIN namedplace USING (namedplace_id)
46 46
    WHERE
47
    place.plotplace_id = plot.plot_id
47
    place.plot_id = plot.plot_id
48 48
    AND placesystem = 'Geographic Name'
49 49
    LIMIT 1
50 50
    ) AS "Geographic Name"

Also available in: Unified diff