12

I need to use very simple geometry operations (read SHP or other standard format and simple searches) within an embedded device running a simple linux based os.

What is the smallest and simplest API I could use?

It could be written in C/C++ or Python in order to allow the integration with my system.

Thanks,

Samuel

Mapperz
  • 49,701
  • 9
  • 73
  • 132
Samuel
  • 221
  • 1
  • 4

5 Answers5

7

Check out Shapelib. It's a small C library for simple shapefile manipulation.

Jaime Soto
  • 1,393
  • 12
  • 23
6

I can't make any claims about 'smallest' but a couple options are:

  • PySAL: Python Statistical Analysis Library. It can read shapefiles natively. You could include only the modules you need.
  • SpatiaLite: Store your data in a spatially-enabled SQLite database. SpatiaLite includes a feature called 'virtual shapefile' that allows you to directly access a shapefile and query it as if it were a database table without actually importing it.
Sean
  • 4,187
  • 19
  • 24
3

There is a simple python tool here: http://www.axismaps.com/code.php

Pablo
  • 9,827
  • 6
  • 43
  • 73
3

There has been some talk and proposal of such by the qgis community. see it here...
QGIS Wiki

Brad Nesom
  • 17,412
  • 2
  • 42
  • 68
2

What about pyshp and shapely? It is simple, efficient and well documented.

simo
  • 8,580
  • 1
  • 28
  • 56