D 2012-11-10T02:50:22.490 L benchmark-4.0 U sandro W 9470
Fig. 1This one is the orginal set of Contour Lines to be clipped. |
![]() |
Fig. 2This is the final result of the clipping operation.
|
![]() |
Fig. 3This is a magnified detail of the Study Area.As you can easily notice there are lots of Controur Lines; and each Line has many vertices. This one surely is a rather complex problem to be resolved, and it represents a thorough and demanding test. |
![]() |
.loadshp parameters | Step #1simply a dot macro command understood by the SpatiaLite frontend tool, allowing to directly import an external Shapefile into a corresponding Spatial Table within the DB. |
Step #2this single SQL query performs all the actual Clipping task.ST_Intersection() is a Spatial SQL function computing the intersection between the Study Area (polygon) and each Contour Line (linestring). This could be:
| |
Step #3just a stupid post-processing step; the previous query has surely generated many NULL geometries, and we'll now delete all them. | |
Step #4the very final post-processing step: transforming the table containing all Clipped Contour Lines into a genuine Spatial Table supported by its own Spatial Index. | |
this simply is a weird but in this specifc case really useful SQL trick; we'll query the system clock immediately before and after performing each step, so to get full trace of the corresponding timings.
|