colouring-cities / colouring-dresden

GNU General Public License v3.0
0 stars 4 forks source link

bugfix: map style for nodata buildings its different in category 'location' and 'team' #36

Closed traveller195 closed 1 year ago

traveller195 commented 1 year ago

bugfix: map style for nodata buildings its different in category 'location' and 'team'

maybe it is an older strike and fill color etc. or perhaps, the building layer is loaded twice in two layers?

--> in the end, send as pull reqest to colouring-core

traveller195 commented 1 year ago

see here ../app/map_styles/polygon.xml

traveller195 commented 1 year ago

it might be related to the fact, that those both categories having map legends for percentage of collected data. this could be the reason, why the default building map style is different, as well.

see dataDefinition .../app/src/tiles/dataDefinition.ts

and map styles: .../app/map_styles/polygon.xml

traveller195 commented 1 year ago

see map style for "location" and for "team" in polygon.xml

    <Rule>
        <MaxScaleDenominator>17061</MaxScaleDenominator>
        <MinScaleDenominator>4264</MinScaleDenominator>
        <LineSymbolizer stroke="#888" stroke-width="1.0"/>
    </Rule>
    <Rule>
        <MaxScaleDenominator>4264</MaxScaleDenominator>
        <MinScaleDenominator>0</MinScaleDenominator>
        <LineSymbolizer stroke="#888" stroke-width="3.0"/>
    </Rule>

Because all building geometries were selected by the dataDefinition, it will all get a stroke of 3.0 width... it this is an other behaviour than in other data categories (because there, only the nodata buildings will be selcted and visualized )

traveller195 commented 1 year ago

I first copied the rules (which relates to different map scales) for stroke into the filter-rules... but it is not valid map style, so I changed it back to origin map style.

It could be better to use a second nested SQL select within the data definition to only select buildings having more than zero percentage of collected data... could be the better solution

traveller195 commented 1 year ago

no using subquery/ nested SQL select to only select buildings with some collected data

location: SELECT blds_with_data.* FROM ( SELECT geometry_id, ( case when location_name IS NULL then 0 else 1 end + case when location_number IS NULL then 0 else 1 end + case when location_street IS NULL then 0 else 1 end + case when location_line_two IS NULL then 0 else 1 end + case when location_town IS NULL then 0 else 1 end + case when location_postcode IS NULL then 0 else 1 end + case when location_latitude IS NULL then 0 else 1 end + case when location_longitude IS NULL then 0 else 1 end + case when ref_toid IS NULL then 0 else 1 end + case when ref_osm_id IS NULL then 0 else 1 end ) AS location_info_count FROM buildings ) AS blds_with_data WHERE blds_with_data.location_info_count > 0, team: SELECT blds_with_data.* FROM ( SELECT geometry_id, ( case when has_extension IS NULL then 0 else 1 end + case when extension_year IS NULL then 0 else 1 end + case when developer_type IS NULL then 0 else 1 end + case when developer_name IS NULL then 0 else 1 end + case when developer_source_link IS NULL then 0 else 1 end + case when designers IS NULL then 0 else 1 end + case when designers_source_link IS NULL then 0 else 1 end + case when lead_designer_type IS NULL then 0 else 1 end + case when designer_awards IS NULL then 0 else 1 end + case when awards_source_link IS NULL then 0 else 1 end + case when builder IS NULL then 0 else 1 end + case when builder_source_link IS NULL then 0 else 1 end + case when other_team IS NULL then 0 else 1 end + case when other_team_source_link IS NULL then 0 else 1 end + case when date_year IS NULL then 0 else 1 end ) AS team_info_count FROM buildings ) AS blds_with_data WHERE blds_with_data.team_info_count > 0,

traveller195 commented 1 year ago

solved with d85d73d31a15ad272998eb050c5106984e56397e