Create maps from an SVG file in Roassal
Hi there, I'm trying to import an SVG file describing the provinces of Belgium in Roassal. I've cleaned an SVG file found on wikipedia and trying to import it. I'm trying to imitate the way it is done with Countries. So: RTMapBuilder class>>provincesOfBelgium
^ #(#antwerp #brussels #eastFlanders #flemishBrabant #hainaut #liege #limburg #luxembourg #namur #walloonBrabant #westFlanders)
and implemented to corresponding SVG paths. Here's one example: RTSVGPath class>> antwerp
^'m 177.419,25.0693 1.379,-3.5593 -2.986,-1.3778 -3.33,0.5742 -0.114,-3.1001 -4.019,-4.0187 1.492,-5.9704 -2.181,-2.8706 -1.952,-0.2298 -1.034,-1.2628 -2.411,5.1667 -3.673,3.7892 -3.101,-2.067 -5.396,1.378 -2.068,-1.8371 4.479,-0.9188 0.345,-5.1667 -6.2,-2.1815 -4.938,5.741 0.114,2.8704 -8.611,-0.574 1.264,-5.5112 -5.397,0 -6.43,3.4444 1.263,4.5929 2.411,2.7555 -1.492,2.6409 -4.478,-0.6891 0.115,-2.7555 -6.43,0.3443 0,2.4112 2.296,0.5743 -0.345,5.5112 3.904,1.0336 -3.1,3.3295 3.056,7.4863 0.504,5.9475 -7.923,0.2296 -2.985,3.1002 1.722,1.837 -0.114,3.5595 2.889,0.4893 3.352,-0.9423 7.038,4.5375 3.704,-0.5553 1.759,1.7593 3.149,-1.7593 4.075,2.1297 2.963,-3.6118 11.112,-1.7592 0.092,3.3337 11.576,-3.6113 1.204,-3.0562 5.001,-0.8332 2.129,-3.8894 4.723,-0.7409 0.741,-1.9448 2.223,0.8336 1.481,-0.8336 0.186,-4.9079 -4.075,-2.0373 1.605,-5.4063 z'.
Very naively, I've tried: provinceExample
"self new provinceExample" | b | b := RTMapBuilder new. b countries: RTMapBuilder provincesOfBelgium. b color: Color lightGrey. b open.
Which does not display anything. I suspect the problem lies in the coordinates of my paths. Is there a README somehwere or the original file that was used to generate the world map of the examples? Cheers, Francois
On Fri, Jul 31, 2015 at 6:31 PM, François Stephany < tulipe.moutarde@gmail.com> wrote:
Hi there,
I'm trying to import an SVG file describing the provinces of Belgium in Roassal. I've cleaned an SVG file found on wikipedia and trying to import it.
I'm trying to imitate the way it is done with Countries. So:
RTMapBuilder class>>provincesOfBelgium
^ #(#antwerp #brussels #eastFlanders #flemishBrabant #hainaut #liege #limburg #luxembourg #namur #walloonBrabant #westFlanders)
and implemented to corresponding SVG paths. Here's one example:
RTSVGPath class>> antwerp
^'m 177.419,25.0693 1.379,-3.5593 -2.986,-1.3778 -3.33,0.5742 -0.114,-3.1001 -4.019,-4.0187 1.492,-5.9704 -2.181,-2.8706 -1.952,-0.2298 -1.034,-1.2628 -2.411,5.1667 -3.673,3.7892 -3.101,-2.067 -5.396,1.378 -2.068,-1.8371 4.479,-0.9188 0.345,-5.1667 -6.2,-2.1815 -4.938,5.741 0.114,2.8704 -8.611,-0.574 1.264,-5.5112 -5.397,0 -6.43,3.4444 1.263,4.5929 2.411,2.7555 -1.492,2.6409 -4.478,-0.6891 0.115,-2.7555 -6.43,0.3443 0,2.4112 2.296,0.5743 -0.345,5.5112 3.904,1.0336 -3.1,3.3295 3.056,7.4863 0.504,5.9475 -7.923,0.2296 -2.985,3.1002 1.722,1.837 -0.114,3.5595 2.889,0.4893 3.352,-0.9423 7.038,4.5375 3.704,-0.5553 1.759,1.7593 3.149,-1.7593 4.075,2.1297 2.963,-3.6118 11.112,-1.7592 0.092,3.3337 11.576,-3.6113 1.204,-3.0562 5.001,-0.8332 2.129,-3.8894 4.723,-0.7409 0.741,-1.9448 2.223,0.8336 1.481,-0.8336 0.186,-4.9079 -4.075,-2.0373 1.605,-5.4063 z'.
Apparently the path parser doesn't conform to specs? in the code I see a nice comment "The description of SVG path, says that M and m may accept more than one coordinates. In practices, this is rarely the case. " This also applies for other commands that should support multiple coordinates. anyway, try this (I made all line-to commands explicit): 'm 177.419,25.0693 l 1.379,-3.5593 l -2.986,-1.3778 l -3.33,0.5742 l -0.114,-3.1001 l -4.019,-4.0187 l 1.492,-5.9704 l -2.181,-2.8706 l -1.952,-0.2298 l -1.034,-1.2628 l -2.411,5.1667 l -3.673,3.7892 l -3.101,-2.067 l -5.396,1.378 l -2.068,-1.8371 l 4.479,-0.9188 l 0.345,-5.1667 l -6.2,-2.1815 l -4.938,5.741 l 0.114,2.8704 l -8.611,-0.574 l 1.264,-5.5112 l -5.397,0 l -6.43,3.4444 l 1.263,4.5929 l 2.411,2.7555 l -1.492,2.6409 l -4.478,-0.6891 l 0.115,-2.7555 l -6.43,0.3443 l 0,2.4112 l 2.296,0.5743 l -0.345,5.5112 l 3.904,1.0336 l -3.1,3.3295 l 3.056,7.4863 l 0.504,5.9475 l -7.923,0.2296 l -2.985,3.1002 l 1.722,1.837 l -0.114,3.5595 l 2.889,0.4893 l 3.352,-0.9423 l 7.038,4.5375 l 3.704,-0.5553 l 1.759,1.7593 l 3.149,-1.7593 l 4.075,2.1297 l 2.963,-3.6118 l 11.112,-1.7592 l 0.092,3.3337 l 11.576,-3.6113 l 1.204,-3.0562 l 5.001,-0.8332 l 2.129,-3.8894 l 4.723,-0.7409 l 0.741,-1.9448 l 2.223,0.8336 l 1.481,-0.8336 l 0.186,-4.9079 l -4.075,-2.0373 l 1.605,-5.4063 z' Is there a README somehwere or the original file that was used to generate
the world map of the examples?
The chapter for MapBuilder hasn't been done yet, but it is planned. :) Peter
It will soon come :-) Alexandre -- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
On Jul 31, 2015, at 2:36 PM, Peter Uhnák <i.uhnak@gmail.com> wrote:
The chapter for MapBuilder hasn't been done yet, but it is planned. :)
It works with the explicit line-to: Any hint on how to force its inclusion in Inkscape ? On Fri, Jul 31, 2015 at 9:18 PM, Alexandre Bergel <alexandre.bergel@me.com> wrote:
It will soon come :-)
Alexandre -- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
On Jul 31, 2015, at 2:36 PM, Peter Uhnák <i.uhnak@gmail.com> wrote:
The chapter for MapBuilder hasn't been done yet, but it is planned. :)
Hey, you forgot Baarle-Hertog ⦠https://en.wikipedia.org/wiki/Baarle-Hertog <https://en.wikipedia.org/wiki/Baarle-Hertog> Or maybe thatâs even too complicated a situation for SVG to handle :-)
On Jul 31, 2015, at 16:51, François Stephany <tulipe.moutarde@gmail.com> wrote:
It works with the explicit line-to: Any hint on how to force its inclusion in Inkscape ?
On Fri, Jul 31, 2015 at 9:18 PM, Alexandre Bergel <alexandre.bergel@me.com <mailto:alexandre.bergel@me.com>> wrote: It will soon come :-)
Alexandre -- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu <http://www.bergel.eu/> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
On Jul 31, 2015, at 2:36 PM, Peter Uhnák <i.uhnak@gmail.com <mailto:i.uhnak@gmail.com>> wrote:
The chapter for MapBuilder hasn't been done yet, but it is planned. :)
<Screen Shot 2015-07-31 at 21.50.58.png>
---> Save our in-boxes! http://emailcharter.org <--- Johan Fabry - http://pleiad.cl/~jfabry PLEIAD and RyCh labs - Computer Science Department (DCC) - University of Chile
You're right Baarle-Hertog neighbourhood are not in the SVG file :( It should'nt be a problem to express their position in SVG. Have a look at the Comines-Warneton 'which is part of Hainaut) stuck between France and West-Flanders ;) On Fri, Jul 31, 2015 at 10:15 PM, Johan Fabry <jfabry@dcc.uchile.cl> wrote:
Hey, you forgot Baarle-Hertog ⦠https://en.wikipedia.org/wiki/Baarle-Hertog Or maybe thatâs even too complicated a situation for SVG to handle :-)
On Jul 31, 2015, at 16:51, François Stephany <tulipe.moutarde@gmail.com> wrote:
It works with the explicit line-to: Any hint on how to force its inclusion in Inkscape ?
On Fri, Jul 31, 2015 at 9:18 PM, Alexandre Bergel <alexandre.bergel@me.com
wrote:
It will soon come :-)
Alexandre -- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
On Jul 31, 2015, at 2:36 PM, Peter Uhnák <i.uhnak@gmail.com> wrote:
The chapter for MapBuilder hasn't been done yet, but it is planned. :)
<Screen Shot 2015-07-31 at 21.50.58.png>
---> Save our in-boxes! http://emailcharter.org <---
Johan Fabry - http://pleiad.cl/~jfabry PLEIAD and RyCh labs - Computer Science Department (DCC) - University of Chile
Hey, what happened to Voeren? https://en.wikipedia.org/wiki/Voeren <https://en.wikipedia.org/wiki/Voeren> Thatâs part of Limburg which is also not on the map. Thatâs already 2 parts of Flanders left out. This is grounds for an âaffaire communautaireâ to happen soon! :-P
On Jul 31, 2015, at 17:28, François Stephany <tulipe.moutarde@gmail.com> wrote:
You're right Baarle-Hertog neighbourhood are not in the SVG file :( It should'nt be a problem to express their position in SVG. Have a look at the Comines-Warneton 'which is part of Hainaut) stuck between France and West-Flanders ;)
On Fri, Jul 31, 2015 at 10:15 PM, Johan Fabry <jfabry@dcc.uchile.cl <mailto:jfabry@dcc.uchile.cl>> wrote:
Hey, you forgot Baarle-Hertog ⦠https://en.wikipedia.org/wiki/Baarle-Hertog <https://en.wikipedia.org/wiki/Baarle-Hertog> Or maybe thatâs even too complicated a situation for SVG to handle :-)
---> Save our in-boxes! http://emailcharter.org <--- Johan Fabry - http://pleiad.cl/~jfabry PLEIAD and RyCh labs - Computer Science Department (DCC) - University of Chile
Let's ditch Flanders altogether! On 31 Jul 2015 23:17, "Johan Fabry" <jfabry@dcc.uchile.cl> wrote:
Hey, what happened to Voeren? https://en.wikipedia.org/wiki/Voeren Thatâs part of Limburg which is also not on the map. Thatâs already 2 parts of Flanders left out. This is grounds for an âaffaire communautaireâ to happen soon! :-P
On Jul 31, 2015, at 17:28, François Stephany <tulipe.moutarde@gmail.com> wrote:
You're right Baarle-Hertog neighbourhood are not in the SVG file :( It should'nt be a problem to express their position in SVG. Have a look at the Comines-Warneton 'which is part of Hainaut) stuck between France and West-Flanders ;)
On Fri, Jul 31, 2015 at 10:15 PM, Johan Fabry <jfabry@dcc.uchile.cl> wrote:
Hey, you forgot Baarle-Hertog ⦠https://en.wikipedia.org/wiki/Baarle-Hertog Or maybe thatâs even too complicated a situation for SVG to handle :-)
---> Save our in-boxes! http://emailcharter.org <---
Johan Fabry - http://pleiad.cl/~jfabry PLEIAD and RyCh labs - Computer Science Department (DCC) - University of Chile
You mean, letâs ditch Wallonia, right?
On Jul 31, 2015, at 18:28, François Stephany <tulipe.moutarde@gmail.com> wrote:
Let's ditch Flanders altogether!
On 31 Jul 2015 23:17, "Johan Fabry" <jfabry@dcc.uchile.cl <mailto:jfabry@dcc.uchile.cl>> wrote:
Hey, what happened to Voeren? https://en.wikipedia.org/wiki/Voeren <https://en.wikipedia.org/wiki/Voeren> Thatâs part of Limburg which is also not on the map. Thatâs already 2 parts of Flanders left out. This is grounds for an âaffaire communautaireâ to happen soon! :-P
On Jul 31, 2015, at 17:28, François Stephany <tulipe.moutarde@gmail.com <mailto:tulipe.moutarde@gmail.com>> wrote:
You're right Baarle-Hertog neighbourhood are not in the SVG file :( It should'nt be a problem to express their position in SVG. Have a look at the Comines-Warneton 'which is part of Hainaut) stuck between France and West-Flanders ;)
On Fri, Jul 31, 2015 at 10:15 PM, Johan Fabry <jfabry@dcc.uchile.cl <mailto:jfabry@dcc.uchile.cl>> wrote:
Hey, you forgot Baarle-Hertog ⦠https://en.wikipedia.org/wiki/Baarle-Hertog <https://en.wikipedia.org/wiki/Baarle-Hertog> Or maybe thatâs even too complicated a situation for SVG to handle :-)
---> Save our in-boxes! http://emailcharter.org <http://emailcharter.org/> <---
Johan Fabry - http://pleiad.cl/~jfabry <http://pleiad.cl/~jfabry> PLEIAD and RyCh labs - Computer Science Department (DCC) - University of Chile
---> Save our in-boxes! http://emailcharter.org <--- Johan Fabry - http://pleiad.cl/~jfabry PLEIAD and RyCh labs - Computer Science Department (DCC) - University of Chile
Flanders geography looks way too complicated for a sane brain :p On Fri, Jul 31, 2015 at 11:36 PM, Johan Fabry <jfabry@dcc.uchile.cl> wrote:
You mean, letâs ditch Wallonia, right?
On Jul 31, 2015, at 18:28, François Stephany <tulipe.moutarde@gmail.com> wrote:
Let's ditch Flanders altogether! On 31 Jul 2015 23:17, "Johan Fabry" <jfabry@dcc.uchile.cl> wrote:
Hey, what happened to Voeren? https://en.wikipedia.org/wiki/Voeren Thatâs part of Limburg which is also not on the map. Thatâs already 2 parts of Flanders left out. This is grounds for an âaffaire communautaireâ to happen soon! :-P
On Jul 31, 2015, at 17:28, François Stephany <tulipe.moutarde@gmail.com> wrote:
You're right Baarle-Hertog neighbourhood are not in the SVG file :( It should'nt be a problem to express their position in SVG. Have a look at the Comines-Warneton 'which is part of Hainaut) stuck between France and West-Flanders ;)
On Fri, Jul 31, 2015 at 10:15 PM, Johan Fabry <jfabry@dcc.uchile.cl> wrote:
Hey, you forgot Baarle-Hertog ⦠https://en.wikipedia.org/wiki/Baarle-Hertog Or maybe thatâs even too complicated a situation for SVG to handle :-)
---> Save our in-boxes! http://emailcharter.org <---
Johan Fabry - http://pleiad.cl/~jfabry PLEIAD and RyCh labs - Computer Science Department (DCC) - University of Chile
---> Save our in-boxes! http://emailcharter.org <---
Johan Fabry - http://pleiad.cl/~jfabry PLEIAD and RyCh labs - Computer Science Department (DCC) - University of Chile
Hi François, I don't think it's worth fixing in the current implementation, however there is already available SVG importer into Pharo, so I'll try to find a way how to adapt it. It should support regular SVG (circle, rectangle, ...), not just path. Peter On Fri, Jul 31, 2015 at 11:42 PM, François Stephany < tulipe.moutarde@gmail.com> wrote:
Flanders geography looks way too complicated for a sane brain :p
On Fri, Jul 31, 2015 at 11:36 PM, Johan Fabry <jfabry@dcc.uchile.cl> wrote:
You mean, letâs ditch Wallonia, right?
On Jul 31, 2015, at 18:28, François Stephany <tulipe.moutarde@gmail.com> wrote:
Let's ditch Flanders altogether! On 31 Jul 2015 23:17, "Johan Fabry" <jfabry@dcc.uchile.cl> wrote:
Hey, what happened to Voeren? https://en.wikipedia.org/wiki/Voeren Thatâs part of Limburg which is also not on the map. Thatâs already 2 parts of Flanders left out. This is grounds for an âaffaire communautaireâ to happen soon! :-P
On Jul 31, 2015, at 17:28, François Stephany <tulipe.moutarde@gmail.com> wrote:
You're right Baarle-Hertog neighbourhood are not in the SVG file :( It should'nt be a problem to express their position in SVG. Have a look at the Comines-Warneton 'which is part of Hainaut) stuck between France and West-Flanders ;)
On Fri, Jul 31, 2015 at 10:15 PM, Johan Fabry <jfabry@dcc.uchile.cl> wrote:
Hey, you forgot Baarle-Hertog ⦠https://en.wikipedia.org/wiki/Baarle-Hertog Or maybe thatâs even too complicated a situation for SVG to handle :-)
---> Save our in-boxes! http://emailcharter.org <---
Johan Fabry - http://pleiad.cl/~jfabry PLEIAD and RyCh labs - Computer Science Department (DCC) - University of Chile
---> Save our in-boxes! http://emailcharter.org <---
Johan Fabry - http://pleiad.cl/~jfabry PLEIAD and RyCh labs - Computer Science Department (DCC) - University of Chile
This is Athens-SVG btw (not loaded by default in Pharo, but available in Athens repository). I think Stef mentioned it several times in regards to RTSVGPath. Peter On Sat, Aug 1, 2015 at 11:32 AM, Peter Uhnák <i.uhnak@gmail.com> wrote:
Hi François,
I don't think it's worth fixing in the current implementation, however there is already available SVG importer into Pharo, so I'll try to find a way how to adapt it. It should support regular SVG (circle, rectangle, ...), not just path.
Peter
On Fri, Jul 31, 2015 at 11:42 PM, François Stephany < tulipe.moutarde@gmail.com> wrote:
Flanders geography looks way too complicated for a sane brain :p
On Fri, Jul 31, 2015 at 11:36 PM, Johan Fabry <jfabry@dcc.uchile.cl> wrote:
You mean, letâs ditch Wallonia, right?
On Jul 31, 2015, at 18:28, François Stephany <tulipe.moutarde@gmail.com> wrote:
Let's ditch Flanders altogether! On 31 Jul 2015 23:17, "Johan Fabry" <jfabry@dcc.uchile.cl> wrote:
Hey, what happened to Voeren? https://en.wikipedia.org/wiki/Voeren Thatâs part of Limburg which is also not on the map. Thatâs already 2 parts of Flanders left out. This is grounds for an âaffaire communautaireâ to happen soon! :-P
On Jul 31, 2015, at 17:28, François Stephany <tulipe.moutarde@gmail.com> wrote:
You're right Baarle-Hertog neighbourhood are not in the SVG file :( It should'nt be a problem to express their position in SVG. Have a look at the Comines-Warneton 'which is part of Hainaut) stuck between France and West-Flanders ;)
On Fri, Jul 31, 2015 at 10:15 PM, Johan Fabry <jfabry@dcc.uchile.cl> wrote:
Hey, you forgot Baarle-Hertog ⦠https://en.wikipedia.org/wiki/Baarle-Hertog Or maybe thatâs even too complicated a situation for SVG to handle :-)
---> Save our in-boxes! http://emailcharter.org <---
Johan Fabry - http://pleiad.cl/~jfabry PLEIAD and RyCh labs - Computer Science Department (DCC) - University of Chile
---> Save our in-boxes! http://emailcharter.org <---
Johan Fabry - http://pleiad.cl/~jfabry PLEIAD and RyCh labs - Computer Science Department (DCC) - University of Chile
Okidoki ! I've found the option to explicitly include the "lineto" in Inkscape (see the attached screenshot of the Preferences). thanks! On Sat, Aug 1, 2015 at 11:34 AM, Peter Uhnák <i.uhnak@gmail.com> wrote:
This is Athens-SVG btw (not loaded by default in Pharo, but available in Athens repository). I think Stef mentioned it several times in regards to RTSVGPath.
Peter
On Sat, Aug 1, 2015 at 11:32 AM, Peter Uhnák <i.uhnak@gmail.com> wrote:
Hi François,
I don't think it's worth fixing in the current implementation, however there is already available SVG importer into Pharo, so I'll try to find a way how to adapt it. It should support regular SVG (circle, rectangle, ...), not just path.
Peter
On Fri, Jul 31, 2015 at 11:42 PM, François Stephany < tulipe.moutarde@gmail.com> wrote:
Flanders geography looks way too complicated for a sane brain :p
On Fri, Jul 31, 2015 at 11:36 PM, Johan Fabry <jfabry@dcc.uchile.cl> wrote:
You mean, letâs ditch Wallonia, right?
On Jul 31, 2015, at 18:28, François Stephany <tulipe.moutarde@gmail.com> wrote:
Let's ditch Flanders altogether! On 31 Jul 2015 23:17, "Johan Fabry" <jfabry@dcc.uchile.cl> wrote:
Hey, what happened to Voeren? https://en.wikipedia.org/wiki/Voeren Thatâs part of Limburg which is also not on the map. Thatâs already 2 parts of Flanders left out. This is grounds for an âaffaire communautaireâ to happen soon! :-P
On Jul 31, 2015, at 17:28, François Stephany < tulipe.moutarde@gmail.com> wrote:
You're right Baarle-Hertog neighbourhood are not in the SVG file :( It should'nt be a problem to express their position in SVG. Have a look at the Comines-Warneton 'which is part of Hainaut) stuck between France and West-Flanders ;)
On Fri, Jul 31, 2015 at 10:15 PM, Johan Fabry <jfabry@dcc.uchile.cl> wrote:
Hey, you forgot Baarle-Hertog ⦠https://en.wikipedia.org/wiki/Baarle-Hertog Or maybe thatâs even too complicated a situation for SVG to handle :-)
---> Save our in-boxes! http://emailcharter.org <---
Johan Fabry - http://pleiad.cl/~jfabry PLEIAD and RyCh labs - Computer Science Department (DCC) - University of Chile
---> Save our in-boxes! http://emailcharter.org <---
Johan Fabry - http://pleiad.cl/~jfabry PLEIAD and RyCh labs - Computer Science Department (DCC) - University of Chile
On 31-07-15 22:15, Johan Fabry wrote:
Hey, you forgot Baarle-Hertog ⦠https://en.wikipedia.org/wiki/Baarle-Hertog Or maybe thatâs even too complicated a situation for SVG to handle :-)
Especially if you want to exclude the parts of Baarle-Nassau inside of Baarle-Hertog Stephan
Hmm, maybe Athens-SVG will not be so simple, because it's paint-only so I would still have to write a lot of stuff around. But maybe we could grab the SVG path lexer that's there (and is better than in Roassal) and use it to simplify and improve current implementation, so even multi-coordinate commands work. I shall investigate more... Peter On Sat, Aug 1, 2015 at 8:20 PM, Stephan Eggermont <stephan@stack.nl> wrote:
On 31-07-15 22:15, Johan Fabry wrote:
Hey, you forgot Baarle-Hertog ⦠https://en.wikipedia.org/wiki/Baarle-Hertog Or maybe thatâs even too complicated a situation for SVG to handle :-)
Especially if you want to exclude the parts of Baarle-Nassau inside of Baarle-Hertog
Stephan
Yes, it would be great! I first tried to understand the SVG parser in Athens, but I could not make it to work. So I wrote the one in Roassal. But indeed, we need a better thing. By the way, there is no parser supported by Cairo? Iâve just found this: http://cairosvg.org/project_description/ Cheers, Alexandre
On Aug 1, 2015, at 5:47 PM, Peter Uhnák <i.uhnak@gmail.com> wrote:
Hmm, maybe Athens-SVG will not be so simple, because it's paint-only so I would still have to write a lot of stuff around.
But maybe we could grab the SVG path lexer that's there (and is better than in Roassal) and use it to simplify and improve current implementation, so even multi-coordinate commands work. I shall investigate more...
Peter
On Sat, Aug 1, 2015 at 8:20 PM, Stephan Eggermont <stephan@stack.nl> wrote: On 31-07-15 22:15, Johan Fabry wrote:
Hey, you forgot Baarle-Hertog ⦠https://en.wikipedia.org/wiki/Baarle-Hertog Or maybe thatâs even too complicated a situation for SVG to handle :-)
Especially if you want to exclude the parts of Baarle-Nassau inside of Baarle-Hertog
Stephan
-- _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;: Alexandre Bergel http://www.bergel.eu ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
Le 2/8/15 03:02, Alexandre Bergel a écrit :
Yes, it would be great! I first tried to understand the SVG parser in Athens,
Uh? Of course it is working. You can import SVG file.
but I could not make it to work. So I wrote the one in Roassal. Usually this approach does not work because two half done is not equal to one
But indeed, we need a better thing.
By the way, there is no parser supported by Cairo? Iâve just found this: http://cairosvg.org/project_description/
Cheers, Alexandre
On Aug 1, 2015, at 5:47 PM, Peter Uhnák <i.uhnak@gmail.com> wrote:
Hmm, maybe Athens-SVG will not be so simple, because it's paint-only so I would still have to write a lot of stuff around.
But maybe we could grab the SVG path lexer that's there (and is better than in Roassal) and use it to simplify and improve current implementation, so even multi-coordinate commands work. I shall investigate more...
Peter
On Sat, Aug 1, 2015 at 8:20 PM, Stephan Eggermont <stephan@stack.nl> wrote: On 31-07-15 22:15, Johan Fabry wrote:
Hey, you forgot Baarle-Hertog ⦠https://en.wikipedia.org/wiki/Baarle-Hertog Or maybe thatâs even too complicated a situation for SVG to handle :-)
Especially if you want to exclude the parts of Baarle-Nassau inside of Baarle-Hertog
Stephan
Yep, you're right the path parser doesnt not conform with the spec. From Section 8.3.2 of http://www.w3.org/TR/SVG/paths.html#PathDataMovetoCommands If a moveto is followed by multiple pairs of coordinates, the subsequent
pairs are treated as implicit lineto commands.
Thanks for the pointer :) If you have any idea on how to output those explicit "l", I'm all ears... On Fri, Jul 31, 2015 at 7:36 PM, Peter Uhnák <i.uhnak@gmail.com> wrote:
On Fri, Jul 31, 2015 at 6:31 PM, François Stephany < tulipe.moutarde@gmail.com> wrote:
Hi there,
I'm trying to import an SVG file describing the provinces of Belgium in Roassal. I've cleaned an SVG file found on wikipedia and trying to import it.
I'm trying to imitate the way it is done with Countries. So:
RTMapBuilder class>>provincesOfBelgium
^ #(#antwerp #brussels #eastFlanders #flemishBrabant #hainaut #liege #limburg #luxembourg #namur #walloonBrabant #westFlanders)
and implemented to corresponding SVG paths. Here's one example:
RTSVGPath class>> antwerp
^'m 177.419,25.0693 1.379,-3.5593 -2.986,-1.3778 -3.33,0.5742 -0.114,-3.1001 -4.019,-4.0187 1.492,-5.9704 -2.181,-2.8706 -1.952,-0.2298 -1.034,-1.2628 -2.411,5.1667 -3.673,3.7892 -3.101,-2.067 -5.396,1.378 -2.068,-1.8371 4.479,-0.9188 0.345,-5.1667 -6.2,-2.1815 -4.938,5.741 0.114,2.8704 -8.611,-0.574 1.264,-5.5112 -5.397,0 -6.43,3.4444 1.263,4.5929 2.411,2.7555 -1.492,2.6409 -4.478,-0.6891 0.115,-2.7555 -6.43,0.3443 0,2.4112 2.296,0.5743 -0.345,5.5112 3.904,1.0336 -3.1,3.3295 3.056,7.4863 0.504,5.9475 -7.923,0.2296 -2.985,3.1002 1.722,1.837 -0.114,3.5595 2.889,0.4893 3.352,-0.9423 7.038,4.5375 3.704,-0.5553 1.759,1.7593 3.149,-1.7593 4.075,2.1297 2.963,-3.6118 11.112,-1.7592 0.092,3.3337 11.576,-3.6113 1.204,-3.0562 5.001,-0.8332 2.129,-3.8894 4.723,-0.7409 0.741,-1.9448 2.223,0.8336 1.481,-0.8336 0.186,-4.9079 -4.075,-2.0373 1.605,-5.4063 z'.
Apparently the path parser doesn't conform to specs?
in the code I see a nice comment "The description of SVG path, says that M and m may accept more than one coordinates. In practices, this is rarely the case. " This also applies for other commands that should support multiple coordinates.
anyway, try this (I made all line-to commands explicit):
'm 177.419,25.0693 l 1.379,-3.5593 l -2.986,-1.3778 l -3.33,0.5742 l -0.114,-3.1001 l -4.019,-4.0187 l 1.492,-5.9704 l -2.181,-2.8706 l -1.952,-0.2298 l -1.034,-1.2628 l -2.411,5.1667 l -3.673,3.7892 l -3.101,-2.067 l -5.396,1.378 l -2.068,-1.8371 l 4.479,-0.9188 l 0.345,-5.1667 l -6.2,-2.1815 l -4.938,5.741 l 0.114,2.8704 l -8.611,-0.574 l 1.264,-5.5112 l -5.397,0 l -6.43,3.4444 l 1.263,4.5929 l 2.411,2.7555 l -1.492,2.6409 l -4.478,-0.6891 l 0.115,-2.7555 l -6.43,0.3443 l 0,2.4112 l 2.296,0.5743 l -0.345,5.5112 l 3.904,1.0336 l -3.1,3.3295 l 3.056,7.4863 l 0.504,5.9475 l -7.923,0.2296 l -2.985,3.1002 l 1.722,1.837 l -0.114,3.5595 l 2.889,0.4893 l 3.352,-0.9423 l 7.038,4.5375 l 3.704,-0.5553 l 1.759,1.7593 l 3.149,-1.7593 l 4.075,2.1297 l 2.963,-3.6118 l 11.112,-1.7592 l 0.092,3.3337 l 11.576,-3.6113 l 1.204,-3.0562 l 5.001,-0.8332 l 2.129,-3.8894 l 4.723,-0.7409 l 0.741,-1.9448 l 2.223,0.8336 l 1.481,-0.8336 l 0.186,-4.9079 l -4.075,-2.0373 l 1.605,-5.4063 z'
Is there a README somehwere or the original file that was used to
generate the world map of the examples?
The chapter for MapBuilder hasn't been done yet, but it is planned. :)
Peter
On Fri, Jul 31, 2015 at 10:10 PM, François Stephany < tulipe.moutarde@gmail.com> wrote:
Yep, you're right the path parser doesnt not conform with the spec. From Section 8.3.2 of http://www.w3.org/TR/SVG/paths.html#PathDataMovetoCommands
If a moveto is followed by multiple pairs of coordinates, the subsequent
pairs are treated as implicit lineto commands.
Thanks for the pointer :) If you have any idea on how to output those explicit "l", I'm all ears...
Well I just took your string and replaced all spaces except for the first and last with ' l ' :-D yourString copyReplaceAll: ' ' with ' l '. Peter
Yep that's what I ended up doing but it would we cool to export and don't think about that ;) On Fri, Jul 31, 2015 at 10:16 PM, Peter Uhnák <i.uhnak@gmail.com> wrote:
On Fri, Jul 31, 2015 at 10:10 PM, François Stephany < tulipe.moutarde@gmail.com> wrote:
Yep, you're right the path parser doesnt not conform with the spec. From Section 8.3.2 of http://www.w3.org/TR/SVG/paths.html#PathDataMovetoCommands
If a moveto is followed by multiple pairs of coordinates, the subsequent
pairs are treated as implicit lineto commands.
Thanks for the pointer :) If you have any idea on how to output those explicit "l", I'm all ears...
Well I just took your string and replaced all spaces except for the first and last with ' l ' :-D yourString copyReplaceAll: ' ' with ' l '.
Peter
participants (6)
-
Alexandre Bergel -
François Stephany -
Johan Fabry -
Peter Uhnák -
Stephan Eggermont -
stepharo