1

I'm trying to create a shapefile consisting of lines from my python output. The output of the function is :

[[[400 421 427 114]]

[[227 475 237 356]]

[[408 383 427 124]]

[[456 322 500 327]]

[[436  68 441   8]]]

Where [X coord start point, y start point, x end point, y end point]

I've tried Shapely and Fiona but I can't get it to read this format. How to iterate between the coordinates and putting them into a shapefile?

  • Do you have some code where you tried to put those numbers in shapefiles? – Mazu_R Jul 24 '18 at 9:24
  • Yeah I tried a couple of things but it didn't lead anywhere, so i don't think it's very useful to share. – Squaree Jul 24 '18 at 9:38
  • Indeed it is, that way we can help you with your code instead of writing the whole solution. – Mazu_R Jul 24 '18 at 9:41
  • Yeah okay, I wasn't really looking for a whole code, but more a direction of software or libraries that can help me accomplish it. – Squaree Jul 24 '18 at 11:17
  • 1
    @Squaree you are on the right path using shapely and fiona, but as Mazu_R said we need to see what you tried to complete it or correct where it is wrong ;) – Hicham Zouarhi Jul 24 '18 at 13:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.