P
P
Pavel2015-08-25 12:49:52
JavaScript
Pavel, 2015-08-25 12:49:52

How to turn an svg file into a matrix of values ​​by coordinates?

Here we have, for example, some kind of svg-shka. She has lines, filled shapes.
How to make a kind of array from this svg with 0 and 1, depending on whether there is a line or fill (1), or emptiness (0) at each view point. Let's say the coordinates are all integers. The output should be something like this:
[
[0,0,0,1,0],
[0,1,1,1,0],
[0,1,1,1,0],
[0,0 ,0,1,0],
]

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey Ivanov, 2015-08-25
@Writerim

techslides.com/image-to-svg-to-geojson-converters
so I understand this is necessary?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question