publiclab / mapknitter

Upload your own aerial images, position (rubbersheet) them in a web interface over existing map data, and share via web or composite and export for print.
http://mapknitter.org
GNU General Public License v3.0
267 stars 210 forks source link

Resolution export values differ in map and exports list #169

Open numeroteca opened 9 years ago

numeroteca commented 9 years ago

I see different values for the resolution set in the map (15.0 cm/px, http://mapknitter.org/maps/2015-04-14-barcelona-macba#) and the resolution in the exports' list (12.0 cm/px, http://mapknitter.org/exports).

In another map (http://mapknitter.org/maps/puerta-del-sol-vuelo-2) resolution is set to 5.0 cm/px but in the exports' list is displayed as 0.0 cm/px. By the way, it is trying to be exported since 24 days ago.

jywarren commented 9 years ago

I've noticed this too and it def. bears investigation.

ebarry commented 9 years ago

only some of them are wrong. i outlined the incorrect ones below:

screen shot 2015-07-22 at 12 57 07 pm

jywarren commented 9 years ago

The map export slider uses a default set here

    @resolution = @map.average_cm_per_pixel.round(4)
    @resolution = 5 if @resolution < 5 # soft-set min res

average_cm_per_pixel is: https://github.com/publiclab/mapknitter/blob/master/app/models/map.rb#L150-L167

/exports uses export.cm_per_pixel which is a database field, set here on export creation, but falling back to map.average_scale if no resolution is set.

I think we have to follow the path of a single export in the logs, which did not get set properly.