Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rotate default view of wind arrow symbols #7

Open
tomkralidis opened this issue May 27, 2013 · 9 comments
Open

rotate default view of wind arrow symbols #7

tomkralidis opened this issue May 27, 2013 · 9 comments
Labels
question V2.0 new functionality, not backwards compatible
Milestone

Comments

@tomkralidis
Copy link
Member

When symbolizing the compound value of wind speed and wind direction, to choose which wind arrow symbol to be used, we use the following approach:

  • map wind speed value to the appropriate wind arrow icon
  • set angle / rotation of symbol based on wind direction (0-360 degrees)
  • display

In our case we use MapServer and have data driven symbol selection based on our observed properties of wind speed / wind direction.

The wind arrow type symbols, by default, have an orientation which needs to be rotated if used as part of automated systems per above. As a result, part of our automated build process has to rotate the symbols accordingly (i.e. rotate all 'north' images 90 degrees CW, rotate all 'south' 90 degrees CCW).

Should we have these rotated to 0 degrees in the codebase by default?

The list of wind arrow symbols can be found with find . -type f -name "*.svg"|grep -i arrow or find . -type f -name "*.svg"|grep -i wind

@chris-little: there may be reasons for having the wind arrow images oriented this way by default, in which case feel free to mark this invalid. Else we can rotate them as default orientation.

@isedwards
Copy link
Collaborator

The main advantage to the symbol library will be it's use in automated applications and this will simplify automation. I'd suggest going ahead unless @chris-little has any objections?

@tomkralidis
Copy link
Member Author

Bump. @chris-little comments/objections?

@tomkralidis
Copy link
Member Author

@chris-little @iedwards the question is how do we rotate the actual SVG files? This affects 301 SVG files.

Here is what we do in our build steps against the PNGs:


 echo "Converting all symbols to PNG"
./scripts/wws_manage.sh png

echo "Rotating missing wind arrows image 90 degrees CCW"
convert ./png/WeatherSymbol_WMO_WindArrowMissing_99.png -rotate -90 ./png/WeatherSymbol_WMO_WindArrowMissing_99.png

echo "Rotating north wind arrows images 90 degrees CW"
for sym in `find ./png -type f -name "WeatherSymbol_WMO_WindArrowNH*.png"`
do
    convert ${sym} -rotate 90 ${sym}
done

echo "Rotating south wind arrows images 90 degrees CCW"
for sym in `find ./png -type f -name "WeatherSymbol_WMO_WindArrowSH*.png"`
do
    convert ${sym} -rotate -90 ${sym}
done

@isedwards
Copy link
Collaborator

@tomkralidis, @chris-little - I believe we're happy for the source SVG symbols to be rotated.

As for how... our immediate answer would have to be to that we'd manually rotate them in inkscape. Are there any SVG libraries out there that could automate the process (or perhaps Inscape has a batch processing mode)?

@isedwards
Copy link
Collaborator

@tomkralidis - did all of the symbols get rotated to 0 degrees in the end?

@tomkralidis
Copy link
Member Author

@isedwards this is not done yet. Any suggestions/help would be great here.

@tomkralidis tomkralidis added this to the 1.0.0 milestone Feb 25, 2015
@chris-little
Copy link
Member

@tomkralidis @isedwards visting here after a lonnnng time! No objections to rotating so arrows (not just wind) all aligned to 0 degrees. I would probably prefer to do it next version (0.8), rather than postpone to V1.0

@isedwards
Copy link
Collaborator

The thinking for making this version 1.x is that it is a breaking change (it could cause some apps to display symbols the wrong way round).

Unless 1.x is reserved for the first stable release? In which case buyer beware.

It's okay to quickly get to high version numbers.

https://semver.org/

@chris-little chris-little added the V2.0 new functionality, not backwards compatible label Jul 31, 2024
@chris-little
Copy link
Member

@tomkralidis When there is a version with vectors rotated to be wrt North/South (portraint mode) rather than East/West (landscape mode), we could make it the normative V1.0, or V2.0, etc, as moving from V0.x to V1.x is theoretically a breaking change!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question V2.0 new functionality, not backwards compatible
Projects
None yet
Development

No branches or pull requests

3 participants