Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Split display and fix database path #7

Merged
merged 2 commits into from
Jan 13, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
272 changes: 140 additions & 132 deletions .depend
Original file line number Diff line number Diff line change
@@ -1,168 +1,176 @@
./database/column.cmo: generic/util.cmi generic/mapped_file.cmi \
./database/column.cmo : generic/util.cmi generic/mapped_file.cmi \
./database/column.cmi
./database/column.cmx: generic/util.cmx generic/mapped_file.cmx \
./database/column.cmx : generic/util.cmx generic/mapped_file.cmx \
./database/column.cmi
./database/column.cmi:
./database/column_ops.cmo: database/column.cmi ./database/column_ops.cmi
./database/column_ops.cmx: database/column.cmx ./database/column_ops.cmi
./database/column_ops.cmi: database/column.cmi
./database/dictionary.cmo: generic/util.cmi database/sorting.cmi \
./database/column.cmi :
./database/column_ops.cmo : database/column.cmi ./database/column_ops.cmi
./database/column_ops.cmx : database/column.cmx ./database/column_ops.cmi
./database/column_ops.cmi : database/column.cmi
./database/dictionary.cmo : generic/util.cmi database/sorting.cmi \
generic/mapped_file.cmi database/column.cmi generic/bytearray.cmi \
./database/dictionary.cmi
./database/dictionary.cmx: generic/util.cmx database/sorting.cmx \
./database/dictionary.cmx : generic/util.cmx database/sorting.cmx \
generic/mapped_file.cmx database/column.cmx generic/bytearray.cmx \
./database/dictionary.cmi
./database/dictionary.cmi: database/column.cmi
./database/join.cmo: database/column.cmi ./database/join.cmi
./database/join.cmx: database/column.cmx ./database/join.cmi
./database/join.cmi: database/column.cmi
./database/projection.cmo: database/column.cmi ./database/projection.cmi
./database/projection.cmx: database/column.cmx ./database/projection.cmi
./database/projection.cmi: database/column.cmi
./database/query.cmo: database/dictionary.cmi generic/debug.cmi \
database/column.cmi
./database/query.cmx: database/dictionary.cmx generic/debug.cmx \
database/column.cmx
./database/rtree.cmo: generic/util.cmi generic/pqueue.cmi \
./database/dictionary.cmi : database/column.cmi
./database/join.cmo : database/column.cmi ./database/join.cmi
./database/join.cmx : database/column.cmx ./database/join.cmi
./database/join.cmi : database/column.cmi
./database/projection.cmo : database/column.cmi ./database/projection.cmi
./database/projection.cmx : database/column.cmx ./database/projection.cmi
./database/projection.cmi : database/column.cmi
./database/query.cmo : generic/util.cmi database/dictionary.cmi \
generic/debug.cmi database/column.cmi
./database/query.cmx : generic/util.cmx database/dictionary.cmx \
generic/debug.cmx database/column.cmx
./database/rtree.cmo : generic/util.cmi generic/pqueue.cmi \
generic/mapped_file.cmi database/column.cmi ./database/rtree.cmi
./database/rtree.cmx: generic/util.cmx generic/pqueue.cmx \
./database/rtree.cmx : generic/util.cmx generic/pqueue.cmx \
generic/mapped_file.cmx database/column.cmx ./database/rtree.cmi
./database/rtree.cmi:
./database/sorting.cmo: database/column.cmi ./database/sorting.cmi
./database/sorting.cmx: database/column.cmx ./database/sorting.cmi
./database/sorting.cmi: database/column.cmi
./database/table.cmo: ./database/table.cmi
./database/table.cmx: ./database/table.cmi
./database/table.cmi:
./generic/binary_heap.cmo: ./generic/binary_heap.cmi
./generic/binary_heap.cmx: ./generic/binary_heap.cmi
./generic/binary_heap.cmi:
./generic/bitvect.cmo: ./generic/bitvect.cmi
./generic/bitvect.cmx: ./generic/bitvect.cmi
./generic/bitvect.cmi:
./generic/bytearray.cmo: ./generic/bytearray.cmi
./generic/bytearray.cmx: ./generic/bytearray.cmi
./generic/bytearray.cmi:
./generic/data_stream.cmo: ./generic/data_stream.cmi
./generic/data_stream.cmx: ./generic/data_stream.cmi
./generic/data_stream.cmi:
./generic/debug.cmo: ./generic/debug.cmi
./generic/debug.cmx: ./generic/debug.cmi
./generic/debug.cmi:
./generic/lru_cache.cmo: ./generic/lru_cache.cmi
./generic/lru_cache.cmx: ./generic/lru_cache.cmi
./generic/lru_cache.cmi:
./generic/mapped_file.cmo: generic/debug.cmi ./generic/mapped_file.cmi
./generic/mapped_file.cmx: generic/debug.cmx ./generic/mapped_file.cmi
./generic/mapped_file.cmi:
./generic/pqueue.cmo: ./generic/pqueue.cmi
./generic/pqueue.cmx: ./generic/pqueue.cmi
./generic/pqueue.cmi:
./generic/protobuf.cmo: ./generic/protobuf.cmi
./generic/protobuf.cmx: ./generic/protobuf.cmi
./generic/protobuf.cmi:
./generic/task.cmo: generic/util.cmi generic/debug.cmi generic/bytearray.cmi \
./generic/task.cmi
./generic/task.cmx: generic/util.cmx generic/debug.cmx generic/bytearray.cmx \
./generic/task.cmi
./generic/task.cmi:
./generic/util.cmo: ./generic/util.cmi
./generic/util.cmx: ./generic/util.cmi
./generic/util.cmi:
./not_used/bloom.cmo: generic/bitvect.cmi ./not_used/bloom.cmi
./not_used/bloom.cmx: generic/bitvect.cmx ./not_used/bloom.cmi
./not_used/bloom.cmi:
./not_used/hierholzer.cmo: database/rtree.cmi database/column.cmi \
./database/rtree.cmi :
./database/sorting.cmo : database/column.cmi ./database/sorting.cmi
./database/sorting.cmx : database/column.cmx ./database/sorting.cmi
./database/sorting.cmi : database/column.cmi
./database/table.cmo : ./database/table.cmi
./database/table.cmx : ./database/table.cmi
./database/table.cmi :
./generic/binary_heap.cmo : ./generic/binary_heap.cmi
./generic/binary_heap.cmx : ./generic/binary_heap.cmi
./generic/binary_heap.cmi :
./generic/bitvect.cmo : ./generic/bitvect.cmi
./generic/bitvect.cmx : ./generic/bitvect.cmi
./generic/bitvect.cmi :
./generic/bytearray.cmo : ./generic/bytearray.cmi
./generic/bytearray.cmx : ./generic/bytearray.cmi
./generic/bytearray.cmi :
./generic/data_stream.cmo : ./generic/data_stream.cmi
./generic/data_stream.cmx : ./generic/data_stream.cmi
./generic/data_stream.cmi :
./generic/debug.cmo : ./generic/debug.cmi
./generic/debug.cmx : ./generic/debug.cmi
./generic/debug.cmi :
./generic/lru_cache.cmo : ./generic/lru_cache.cmi
./generic/lru_cache.cmx : ./generic/lru_cache.cmi
./generic/lru_cache.cmi :
./generic/mapped_file.cmo : generic/debug.cmi ./generic/mapped_file.cmi
./generic/mapped_file.cmx : generic/debug.cmx ./generic/mapped_file.cmi
./generic/mapped_file.cmi :
./generic/pqueue.cmo : ./generic/pqueue.cmi
./generic/pqueue.cmx : ./generic/pqueue.cmi
./generic/pqueue.cmi :
./generic/protobuf.cmo : ./generic/protobuf.cmi
./generic/protobuf.cmx : ./generic/protobuf.cmi
./generic/protobuf.cmi :
./generic/task.cmo : generic/util.cmi generic/debug.cmi \
generic/bytearray.cmi ./generic/task.cmi
./generic/task.cmx : generic/util.cmx generic/debug.cmx \
generic/bytearray.cmx ./generic/task.cmi
./generic/task.cmi :
./generic/util.cmo : ./generic/util.cmi
./generic/util.cmx : ./generic/util.cmi
./generic/util.cmi :
./not_used/bloom.cmo : generic/bitvect.cmi ./not_used/bloom.cmi
./not_used/bloom.cmx : generic/bitvect.cmx ./not_used/bloom.cmi
./not_used/bloom.cmi :
./not_used/hierholzer.cmo : database/rtree.cmi database/column.cmi \
./not_used/hierholzer.cmi
./not_used/hierholzer.cmx: database/rtree.cmx database/column.cmx \
./not_used/hierholzer.cmx : database/rtree.cmx database/column.cmx \
./not_used/hierholzer.cmi
./not_used/hierholzer.cmi:
./not_used/huffman.cmo: generic/pqueue.cmi
./not_used/huffman.cmx: generic/pqueue.cmx
./not_used/osm.cmi:
./not_used/system.cmo: ./not_used/system.cmi
./not_used/system.cmx: ./not_used/system.cmi
./not_used/system.cmi:
./osm/category.cmo: database/dictionary.cmi ./osm/category.cmi
./osm/category.cmx: database/dictionary.cmx ./osm/category.cmi
./osm/category.cmi: database/dictionary.cmi
./osm/clipping.cmo: ./osm/clipping.cmi
./osm/clipping.cmx: ./osm/clipping.cmi
./osm/clipping.cmi:
./osm/coastline.cmo: generic/util.cmi database/rtree.cmi osm/geometry.cmi \
./not_used/hierholzer.cmi :
./not_used/hilbert.cmo :
./not_used/hilbert.cmx :
./not_used/huffman.cmo : generic/pqueue.cmi
./not_used/huffman.cmx : generic/pqueue.cmx
./not_used/osm.cmi :
./not_used/system.cmo : ./not_used/system.cmi
./not_used/system.cmx : ./not_used/system.cmi
./not_used/system.cmi :
./osm/category.cmo : database/dictionary.cmi ./osm/category.cmi
./osm/category.cmx : database/dictionary.cmx ./osm/category.cmi
./osm/category.cmi : database/dictionary.cmi
./osm/clipping.cmo : ./osm/clipping.cmi
./osm/clipping.cmx : ./osm/clipping.cmi
./osm/clipping.cmi :
./osm/coastline.cmo : generic/util.cmi database/rtree.cmi osm/geometry.cmi \
osm/douglas_peucker.cmi database/column.cmi osm/clipping.cmi
./osm/coastline.cmx: generic/util.cmx database/rtree.cmx osm/geometry.cmx \
./osm/coastline.cmx : generic/util.cmx database/rtree.cmx osm/geometry.cmx \
osm/douglas_peucker.cmx database/column.cmx osm/clipping.cmx
./osm/contraction.cmo: generic/util.cmi database/sorting.cmi \
generic/mapped_file.cmi database/column_ops.cmi database/column.cmi \
generic/bitvect.cmi generic/binary_heap.cmi
./osm/contraction.cmx: generic/util.cmx database/sorting.cmx \
generic/mapped_file.cmx database/column_ops.cmx database/column.cmx \
generic/bitvect.cmx generic/binary_heap.cmx
./osm/display.cmo: database/rtree.cmi osm/routing.cmi generic/lru_cache.cmi \
osm/line_smoothing.cmi osm/geometry.cmi osm/douglas_peucker.cmi \
database/column.cmi osm/category.cmi
./osm/display.cmx: database/rtree.cmx osm/routing.cmx generic/lru_cache.cmx \
osm/line_smoothing.cmx osm/geometry.cmx osm/douglas_peucker.cmx \
database/column.cmx osm/category.cmx
./osm/douglas_peucker.cmo: ./osm/douglas_peucker.cmi
./osm/douglas_peucker.cmx: ./osm/douglas_peucker.cmi
./osm/douglas_peucker.cmi:
./osm/geometry.cmo: ./osm/geometry.cmi
./osm/geometry.cmx: ./osm/geometry.cmi
./osm/geometry.cmi:
./osm/highway.cmo: generic/util.cmi database/sorting.cmi \
./osm/contraction.cmo : database/sorting.cmi database/column_ops.cmi \
database/column.cmi generic/bitvect.cmi generic/binary_heap.cmi
./osm/contraction.cmx : database/sorting.cmx database/column_ops.cmx \
database/column.cmx generic/bitvect.cmx generic/binary_heap.cmx
./osm/display.cmo : database/rtree.cmi osm/lib/osm_display.cmo \
osm/geometry.cmi database/column.cmi
./osm/display.cmx : database/rtree.cmx osm/lib/osm_display.cmx \
osm/geometry.cmx database/column.cmx
./osm/douglas_peucker.cmo : ./osm/douglas_peucker.cmi
./osm/douglas_peucker.cmx : ./osm/douglas_peucker.cmi
./osm/douglas_peucker.cmi :
./osm/geometry.cmo : ./osm/geometry.cmi
./osm/geometry.cmx : ./osm/geometry.cmi
./osm/geometry.cmi :
./osm/highway.cmo : generic/util.cmi database/sorting.cmi \
osm/routing_profile.cmi database/projection.cmi generic/mapped_file.cmi \
database/join.cmi osm/geometry.cmi database/dictionary.cmi \
database/column_ops.cmi database/column.cmi
./osm/highway.cmx: generic/util.cmx database/sorting.cmx \
./osm/highway.cmx : generic/util.cmx database/sorting.cmx \
osm/routing_profile.cmx database/projection.cmx generic/mapped_file.cmx \
database/join.cmx osm/geometry.cmx database/dictionary.cmx \
database/column_ops.cmx database/column.cmx
./osm/line_smoothing.cmo: ./osm/line_smoothing.cmi
./osm/line_smoothing.cmx: ./osm/line_smoothing.cmi
./osm/line_smoothing.cmi:
./osm/linear.cmo: database/sorting.cmi database/rtree.cmi \
./osm/lib/osm_display.cmo : database/rtree.cmi osm/routing.cmi \
generic/lru_cache.cmi osm/line_smoothing.cmi osm/geometry.cmi \
osm/douglas_peucker.cmi database/column.cmi osm/category.cmi
./osm/lib/osm_display.cmx : database/rtree.cmx osm/routing.cmx \
generic/lru_cache.cmx osm/line_smoothing.cmx osm/geometry.cmx \
osm/douglas_peucker.cmx database/column.cmx osm/category.cmx
./osm/line_smoothing.cmo : ./osm/line_smoothing.cmi
./osm/line_smoothing.cmx : ./osm/line_smoothing.cmi
./osm/line_smoothing.cmi :
./osm/linear.cmo : generic/util.cmi database/sorting.cmi database/rtree.cmi \
database/projection.cmi database/join.cmi osm/geometry.cmi \
database/dictionary.cmi database/column_ops.cmi database/column.cmi \
osm/category.cmi
./osm/linear.cmx: database/sorting.cmx database/rtree.cmx \
./osm/linear.cmx : generic/util.cmx database/sorting.cmx database/rtree.cmx \
database/projection.cmx database/join.cmx osm/geometry.cmx \
database/dictionary.cmx database/column_ops.cmx database/column.cmx \
osm/category.cmx
./osm/multipolygons.cmo: generic/util.cmi database/sorting.cmi \
./osm/multipolygons.cmo : generic/util.cmi database/sorting.cmi \
database/projection.cmi database/join.cmi osm/geometry.cmi \
database/dictionary.cmi generic/debug.cmi generic/data_stream.cmi \
database/column_ops.cmi database/column.cmi
./osm/multipolygons.cmx: generic/util.cmx database/sorting.cmx \
./osm/multipolygons.cmx : generic/util.cmx database/sorting.cmx \
database/projection.cmx database/join.cmx osm/geometry.cmx \
database/dictionary.cmx generic/debug.cmx generic/data_stream.cmx \
database/column_ops.cmx database/column.cmx
./osm/parser.cmo: generic/util.cmi generic/task.cmi generic/protobuf.cmi \
./osm/parser.cmo : generic/util.cmi generic/task.cmi generic/protobuf.cmi \
generic/debug.cmi database/column.cmi
./osm/parser.cmx: generic/util.cmx generic/task.cmx generic/protobuf.cmx \
./osm/parser.cmx : generic/util.cmx generic/task.cmx generic/protobuf.cmx \
generic/debug.cmx database/column.cmx
./osm/prepare.cmo: generic/util.cmi database/sorting.cmi \
./osm/prepare.cmo : generic/util.cmi database/sorting.cmi \
database/projection.cmi database/join.cmi database/dictionary.cmi \
database/column_ops.cmi database/column.cmi
./osm/prepare.cmx: generic/util.cmx database/sorting.cmx \
./osm/prepare.cmx : generic/util.cmx database/sorting.cmx \
database/projection.cmx database/join.cmx database/dictionary.cmx \
database/column_ops.cmx database/column.cmx
./osm/profile_car.cmo: database/table.cmi osm/routing_profile.cmi
./osm/profile_car.cmx: database/table.cmx osm/routing_profile.cmx
./osm/profile_pedestrian.cmo: database/table.cmi osm/routing_profile.cmi
./osm/profile_pedestrian.cmx: database/table.cmx osm/routing_profile.cmx
./osm/routing.cmo: generic/pqueue.cmi database/column.cmi ./osm/routing.cmi
./osm/routing.cmx: generic/pqueue.cmx database/column.cmx ./osm/routing.cmi
./osm/routing.cmi:
./osm/routing_profile.cmo: database/dictionary.cmi ./osm/routing_profile.cmi
./osm/routing_profile.cmx: database/dictionary.cmx ./osm/routing_profile.cmi
./osm/routing_profile.cmi: database/dictionary.cmi
./osm/surfaces.cmo: generic/util.cmi database/sorting.cmi database/rtree.cmi \
database/projection.cmi database/join.cmi osm/geometry.cmi \
osm/douglas_peucker.cmi database/dictionary.cmi generic/data_stream.cmi \
database/column_ops.cmi database/column.cmi osm/category.cmi
./osm/surfaces.cmx: generic/util.cmx database/sorting.cmx database/rtree.cmx \
database/projection.cmx database/join.cmx osm/geometry.cmx \
osm/douglas_peucker.cmx database/dictionary.cmx generic/data_stream.cmx \
database/column_ops.cmx database/column.cmx osm/category.cmx
./osm/profile_car.cmo : database/table.cmi osm/routing_profile.cmi
./osm/profile_car.cmx : database/table.cmx osm/routing_profile.cmx
./osm/profile_pedestrian.cmo : database/table.cmi osm/routing_profile.cmi
./osm/profile_pedestrian.cmx : database/table.cmx osm/routing_profile.cmx
./osm/routing.cmo : generic/pqueue.cmi database/column.cmi ./osm/routing.cmi
./osm/routing.cmx : generic/pqueue.cmx database/column.cmx ./osm/routing.cmi
./osm/routing.cmi :
./osm/routing_profile.cmo : database/dictionary.cmi \
./osm/routing_profile.cmi
./osm/routing_profile.cmx : database/dictionary.cmx \
./osm/routing_profile.cmi
./osm/routing_profile.cmi : database/dictionary.cmi
./osm/surfaces.cmo : generic/util.cmi database/sorting.cmi \
database/rtree.cmi database/projection.cmi database/join.cmi \
osm/geometry.cmi osm/douglas_peucker.cmi database/dictionary.cmi \
generic/data_stream.cmi database/column_ops.cmi database/column.cmi \
osm/category.cmi
./osm/surfaces.cmx : generic/util.cmx database/sorting.cmx \
database/rtree.cmx database/projection.cmx database/join.cmx \
osm/geometry.cmx osm/douglas_peucker.cmx database/dictionary.cmx \
generic/data_stream.cmx database/column_ops.cmx database/column.cmx \
osm/category.cmx
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ OSM=\
ROUTING=\
routing_profile.cmx profile_car.cmx profile_pedestrian.cmx

DIRS=-I generic -I database -I osm
DIRS=-I generic -I database -I osm -I osm/lib

OBJS= $(addprefix generic/,$(GENERIC)) $(addprefix database/,$(DATABASE)) \
$(addprefix osm/,$(OSM))
Expand Down Expand Up @@ -58,7 +58,7 @@ highway: $(OBJS) $(addprefix osm/, $(ROUTING)) osm/highway.cmx
contraction: $(OBJS) osm/contraction.cmx
$(OCAMLOPT) $(OPTLINKFLAGS) -o $@ $^

display: $(OBJS) osm/routing.cmx osm/line_smoothing.cmx osm/douglas_peucker.cmx osm/category.cmx osm/display.cmx
display: $(OBJS) osm/routing.cmx osm/line_smoothing.cmx osm/douglas_peucker.cmx osm/category.cmx osm/lib/osm_display.cmx osm/display.cmx
$(OCAMLOPT) $(OPTLINKFLAGS) -o $@ $^

coastline: $(OBJS) osm/category.cmx osm/douglas_peucker.cmx osm/clipping.cmx osm/coastline.cmx
Expand Down
11 changes: 5 additions & 6 deletions database/rtree.ml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

let min x y : int = if x < y then x else y
let max x y : int = if x > y then x else y

module Bbox = struct
let max_int = 2147483647
let min_int = -2147483648
Expand Down Expand Up @@ -65,7 +65,7 @@ type level =
{ mutable level_bbox : Bbox.t;
buffer : string;
file : (int32, Bigarray.int32_elt) Mapped_file.output_stream;
mutable idx : int }
mutable idx : int }

module IntMap =
Map.Make (struct type t = int let compare (x : int) y = compare x y end)
Expand All @@ -92,9 +92,8 @@ let rec append_rec stream level bbox =
try
IntMap.find level stream.levels
with Not_found ->
let file =
Column.file_in_database (Format.sprintf "%s/%d" stream.name level) in
Util.make_directories (Column.file_in_database file);
let file = Format.sprintf "%s/%d" stream.name level in
Util.make_directories file;
let st =
{ level_bbox = Bbox.empty;
buffer = String.create (16 * 1024);
Expand Down Expand Up @@ -251,7 +250,7 @@ let find_nearest_point (type feature)
in
let rec loop queue =
match Queue.find_min queue with
(d, Group (i, j)) ->
(d, Group (i, j)) ->
(*Format.eprintf "expand %d %d %d@." d i j;*)
loop (expand i j (Queue.remove_min queue))
| (d, Feature f) -> (d, f)
Expand Down
Loading