ngageoint / hootenanny

Hootenanny conflates multiple maps into a single seamless map.
GNU General Public License v3.0
352 stars 74 forks source link

Add icon information for features in schemas #1131

Closed mattjdnv closed 4 years ago

mattjdnv commented 7 years ago

Add information to the relevant schema's that has the icon to be used when one of these features is created.

This is a split task: @mattjdnv : Provide a list of FCODES & geometries

@rmrice : Create a list with the FCODE, geometry and the icon information

@mattjdnv : Use the list and add it to the schema generator script.

@brianhatchl : Use the icon information in the UI

brianhatchl commented 7 years ago

@mattjdnv has the first step been accomplished yet?

mattjdnv commented 7 years ago

FCODE list attached.

Anything with "raw:fcode" in it doesn't have an OSM+ translation yet. This is mainly GGDM3.0 FCODES.

fcode_list.js.txt

mattjdnv commented 7 years ago

Doh! forgot the geometries.

More to follow.

brianhatchl commented 7 years ago

Not sure if we need geometries, as long as it's okay that the s.ame glyph is used for points and in the center of areas.

mattjdnv commented 7 years ago

I think that will work.

I'll still do the list with geometries so we know what polygons to fill.

brianhatchl commented 7 years ago

We should commit this to the hoot repo under /plugins and on this ticket comment on what section/range of fcodes we are currently working.

The existing icon glyphs that come with iD are in the hoot-ui repo under node_modules/make/src. If a good icon match for the fcode can't be found we can create our own or search the internet for ideas. The icon name such as "farm" or "well" that's assigned to the fcode is in the name of the svg file in the hoot-ui source code.

Will still have to investigate how iD renders line color style thickness for line and area features from the preset information.

mattjdnv commented 7 years ago

Will do.

What format/structure would you like? object with objects?

{ '':{'OSM':'osm_key=osm_value', geometry:['Point','Line','Polygon'], 'name':''}; }

brianhatchl commented 7 years ago

Whatever is easier for you to work with when generating the schemas.

brianhatchl commented 7 years ago

When the UI requests schema info I expect the icon prop would be added to the following:

{
  "name": "PAA012",
  "fcode": "AA012",
  "desc": "Quarry",
  "definition": "An open-air excavation created by removal of stone by blasting or cutting.",
  "geom": "Point",
  "icon": "rocks",
  "columns": [
rmrice commented 7 years ago

PS the maki icons in hoot-ui are the "old" maki icons. There are quite a few more that exist now, and I've created and added a few for MapEdit, so we can use those as well. If there isn't one that exists in the new/old/custom maki set, I can make one since it's probably something that will be used for the MapEdit stylesheet as well.

brianhatchl commented 7 years ago

@rmrice can you provide a list of all the icons you've created for your rendering stylesheet?

rmrice commented 7 years ago

Custom icons I've made for maki 2.0 (11-pt and 15-pt svgs) are:

The rest are included in maki 2.0. You can see all of them in the mapedit-stylesheets repo under img/icon.

rmrice commented 7 years ago

Looks like iD is planning on sticking with the old maki (12-18-24 px), at least for the time being.

rmrice commented 7 years ago

I started matching up icons based on what's in hoot (hoot-ui/node_modules/maki/src): https://docs.google.com/spreadsheets/d/1wPdB14WhQ-bfjjtyNLN6uyvEfLQErHX3bed4NagKvWM/edit?usp=sharing

If you notice, a lot of features don't match up. I propose that we update the maki to the newest version since they are continuing to add more icons, and the custom ones I created match up to those. I think this would just be a matter of updating the node module and whatever code attaches the pixel size to the svg name. Thoughts?

brianhatchl commented 7 years ago

Yes, let's make a ticket for updating to maki 3

sisskind commented 7 years ago

Would this be independent of iD 2.0.x?

brianhatchl commented 7 years ago

Could be, but would be good to know if 2.0 already updates to maki 3

rmrice commented 7 years ago

@sisskind just confirmed with the iD expert. They're still using the old ones in iD 2.0.

sisskind commented 7 years ago

Is that going to make upstream merges ugly or limited effect?

rmrice commented 7 years ago

@sisskind I'm not sure, but @briandaviddavidson thinks it will. I'm sure there's more to it than what I'm thinking, since mapbox hasn't done the update in iD yet (but has talked about it). I just submitted a ticket on our collab repo with mapbox to ask if they plan on updating maki in iD. Will report back when I get an answer!

rmrice commented 7 years ago

Heard back from mapbox, they just added the new maki to iD about a week ago (https://github.com/openstreetmap/iD/pull/3756)!

sisskind commented 6 years ago

@rmrice still relevant?

rmrice commented 6 years ago

Depends on whether or not we want better icon matching for different schemas.

brianhatchl commented 6 years ago

@maxgrossman maybe reactivate for current preset work