pymag-devel Mailing List for Magellan map interface for python
Status: Alpha
Brought to you by:
lhj
You can subscribe to this list here.
2008 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(4) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2009 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(11) |
Jun
(9) |
Jul
(1) |
Aug
|
Sep
|
Oct
(2) |
Nov
(6) |
Dec
|
2010 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(6) |
Sep
|
Oct
|
Nov
|
Dec
|
2011 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
|
2013 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
|
From: Ralf D. <dr...@vi...> - 2013-11-28 20:01:04
|
Hi, pymag is very useful for me, thanks for developing it. I would like to contrubute updated rules for new OSM tags and a shell script to automatically download and add DEM data. Using this script, creating high quality topo maps for Magellan from OSM data gets really simple. Thanks, Ralf |
From: Matthias M. <di...@ar...> - 2011-08-17 07:27:37
|
Hi all I'm from the OpenStreetmap project and always interested in community building and promoting OSM. http://wiki.openstreetmap.org/wiki/User:!i! We would like to get a better support of Magellan maps and a open process to create maps out of our data. For that reason I try to bring the people together and I'm in contact with Magellan to ask for support http://wiki.openstreetmap.org/wiki/OSM_Map_On_Magellan So to anybody out there, please help us to make the custom map support even better than for Garmin :) bye Matthias |
From: BP <bp...@po...> - 2010-08-30 12:01:35
|
After further investigation it seems that some cell elements koords are not discretized When entering get_best_cell with good walues (all values are integer): Get_Best_Cell max_cell_level: 3 bounds: Rec((1806231,-5393593),(2518935,-4680889)) r: Rec((2255666,-5357273),(2257702,-5355556)) Get_Best_Cell i: 8 Get_Best_Cell v: 89088 h: 89088 Get_Best_Cell n: 0 s: 0 w: 5 e: 5 When exception occures the input values are float: Get_Best_Cell max_cell_level: 3 bounds: Rec((1795075.0,-5395331.0),(2540347.0,-4650059.0)) r: Rec((2154286.0,-5316756.0),(2154286.0,-5316756.0)) Get_Best_Cell i: 8 Get_Best_Cell v: 93159.0 h: 93159.0 Get_Best_Cell n: 0.843450444938 s: 0.843450444938 w: 3.85589154027 e: 3.85589154027 Traceback (most recent call last): ... Peter |
From: BP <bp...@po...> - 2010-08-29 17:33:19
|
Hi! I get this error when osm file contains a lot of pois or points. Regards Peter DEBUG Optimizing layer 00_Major_cities DEBUG nlevels=0 for layer 00_Major_cities DEBUG Optimizing layer 00_Large_cities DEBUG nlevels=0 for layer 00_Large_cities DEBUG Optimizing layer 00_Medium_cities DEBUG Max cell elements exceeded for layer 00_Medium_cities. cellnum=1, # of cell elements=4127 DEBUG Max cell elements exceeded for layer 00_Medium_cities. cellnum=1, # of cell elements=4127 DEBUG nlevels=2 for layer 00_Medium_cities WARNING bbox should be a multiple of minimum cell size, adjusting bbox borders Traceback (most recent call last): File "/home/peter/pymag/osmmagellan/osmmag.py", line 260, in <module> main() File "/home/peter/pymag/osmmagellan/osmmag.py", line 256, in main db=options.db File "/home/peter/pymag/osmmagellan/osmmag.py", line 97, in osmmag m.close() File "/usr/local/lib/python2.6/dist-packages/magellan/Map.py", line 369, in close group.optimizeLayers() File "/usr/local/lib/python2.6/dist-packages/magellan/SearchGroup.py", line 116, in optimizeLayers cellrefremap[self.map.getLayerIndex(layer)] = layer.optimize() File "/usr/local/lib/python2.6/dist-packages/magellan/Layer.py", line 480, in optimize newcellrefs = self.addCellElement(ce) File "/usr/local/lib/python2.6/dist-packages/magellan/Layer.py", line 750, in addCellElement self.nlevels) File "/usr/local/lib/python2.6/dist-packages/magellan/Layer.py", line 1086, in get_best_cell m = (n ^ s) | (w ^ e) TypeError: unsupported operand type(s) for ^: 'numpy.float64' and 'numpy.float64' |
From: Aleksandr I. <vit...@gm...> - 2010-08-26 08:39:00
|
osmmag.py -n Bug -r ./rules.xml -o ./bug.imi --name-tag-list=name:ru,name --debug ./bug.osm |
From: Henrik J. <he...@jo...> - 2010-08-15 07:28:28
|
Hi all, I have decided to change revision control system from subversion to git. The reason is that git offers some nice features that subversion doesn't that I got used to in other projects. The command to checkout the latest git version is: git clone git://pymag.git.sourceforge.net/gitroot/pymag/pymag Hope this will not cause too much pain for you. One can always download a tarball from the SF git web gui. /Henrik |
From: Mikael A. <mik...@gm...> - 2010-08-14 17:35:24
|
Great news indeed! I'll give it a try as soon as I can! / Mikael On Sat, Aug 14, 2010 at 19:24, Henrik Johansson <he...@jo...> wrote: > On Wednesday 04 November 2009 11:04:41 Henrik Johansson wrote: >> On Sunday 26 July 2009 20:08:11 Mikael Arvids wrote: >> > Great project! Definitely in my top ten list of open source projects >> > here on sourceforge! >> > >> > I've stumbled on some points that causes MapSend to crash. >> > >> > The first node in the badPOI map is a shopping mall in Borlänge called >> > "Kupolen". I've generated the map with the skimap.xml rules in the >> > svn-tree. This makes the node a POI in the imi-file, and if this is >> > present it will crash MapSend. >> > >> > The second node in the badPoint map is just a kindergarten in >> > Linköping. The map is generated with the osmmagrules.xml rules. This >> > will only add the node as a named point in the imi-file, but it seems >> > to be enough to put MapSend out of its misery. It seems though that >> > the problem only exist if I request that the names should be added >> > (with --name-tag-list=int_name,name). If I omit this MapSend will >> > display the map without any problem. >> >> Hi Mikael, >> >> Thanks for finding this bug and sorry about the very late reply. >> >> I have reproduced the error but I haven't dug any deeper yet. I looks like >> it could be some problem with the name index. I have to dig deeper.. >> > Hi Mikael, > > Finally I got some time to work a little with pymagellan... > > I found the problem. MapSend doesn't like layers with a bounding box with zero > area. A single POI did cause exactly that to happen and by making the bbox a > little bigger than zero the problem was solved it seems. > > /Henrik > > |
From: Henrik J. <he...@jo...> - 2010-08-14 17:24:20
|
On Wednesday 04 November 2009 11:04:41 Henrik Johansson wrote: > On Sunday 26 July 2009 20:08:11 Mikael Arvids wrote: > > Great project! Definitely in my top ten list of open source projects > > here on sourceforge! > > > > I've stumbled on some points that causes MapSend to crash. > > > > The first node in the badPOI map is a shopping mall in Borlänge called > > "Kupolen". I've generated the map with the skimap.xml rules in the > > svn-tree. This makes the node a POI in the imi-file, and if this is > > present it will crash MapSend. > > > > The second node in the badPoint map is just a kindergarten in > > Linköping. The map is generated with the osmmagrules.xml rules. This > > will only add the node as a named point in the imi-file, but it seems > > to be enough to put MapSend out of its misery. It seems though that > > the problem only exist if I request that the names should be added > > (with --name-tag-list=int_name,name). If I omit this MapSend will > > display the map without any problem. > > Hi Mikael, > > Thanks for finding this bug and sorry about the very late reply. > > I have reproduced the error but I haven't dug any deeper yet. I looks like > it could be some problem with the name index. I have to dig deeper.. > Hi Mikael, Finally I got some time to work a little with pymagellan... I found the problem. MapSend doesn't like layers with a bounding box with zero area. A single POI did cause exactly that to happen and by making the bbox a little bigger than zero the problem was solved it seems. /Henrik |
From: bp <bp...@po...> - 2009-11-04 10:52:48
|
Hello again Now an otherone. This exception is thrown only with specific datasets. Does negative coo. mean that one of the elements vertex falls outside the cell? Does it help, if I send you the dataset? INFO Closing map Traceback (most recent call last): File "pymagellan\osmmagellan\osmmag.py", line 260, in <module> main() File "pymagellan\osmmagellan\osmmag.py", line 256, in main db=options.db File "pymagellan\osmmagellan\osmmag.py", line 97, in osmmag m.close() File "d:\Python26\lib\site-packages\magellan\Map.py", line 419, in close self._poiconfig.close() File "d:\Python26\lib\site-packages\magellan\Layer.py", line 294, in close layer.close() File "d:\Python26\lib\site-packages\magellan\Layer.py", line 498, in close celldata = cell.serialize() File "d:\Python26\lib\site-packages\magellan\Cell.py", line 172, in serialize data += self._serialize_cellelement(s) File "d:\Python26\lib\site-packages\magellan\Cell.py", line 85, in _serialize_ cellelement cellelementdata = cellelement.serialize(self, self.layer.bigendian) File "d:\Python26\lib\site-packages\magellan\CellElement.py", line 369, in ser ialize data, bbox = self._serialize_bbox(cell, bigendian) File "d:\Python26\lib\site-packages\magellan\CellElement.py", line 216, in _se rialize_bbox tprec, tdata = self._encodecoord(bbox.c1[1], bigendian) File "d:\Python26\lib\site-packages\magellan\CellElement.py", line 246, in _en codecoord raise ValueError("Absolute coordinates are always positive, c = %f"%c) ValueError: Absolute coordinates are always positive, c = -529.000000 Regards Peter |
From: bp <bp...@po...> - 2009-11-04 10:50:16
|
Hi Henrik, Thanks. It works. POI index problem seems to be solved. Regards Peter Henrik Johansson wrote: > Hi Peter, > > Thanks for taking the time to find the bug. I have checked in your fix but > instead of putting it in Map.py I created an optimze method to the POIGroup > and made the first part of the layer optimization code include POI groups in > addition to the normal groups. > > Please try it out. > > /Henrik > > |
From: Henrik J. <hen...@gm...> - 2009-11-04 10:04:56
|
On Sunday 26 July 2009 20:08:11 Mikael Arvids wrote: > Great project! Definitely in my top ten list of open source projects > here on sourceforge! > > I've stumbled on some points that causes MapSend to crash. > > The first node in the badPOI map is a shopping mall in Borlänge called > "Kupolen". I've generated the map with the skimap.xml rules in the > svn-tree. This makes the node a POI in the imi-file, and if this is > present it will crash MapSend. > > The second node in the badPoint map is just a kindergarten in > Linköping. The map is generated with the osmmagrules.xml rules. This > will only add the node as a named point in the imi-file, but it seems > to be enough to put MapSend out of its misery. It seems though that > the problem only exist if I request that the names should be added > (with --name-tag-list=int_name,name). If I omit this MapSend will > display the map without any problem. > Hi Mikael, Thanks for finding this bug and sorry about the very late reply. I have reproduced the error but I haven't dug any deeper yet. I looks like it could be some problem with the name index. I have to dig deeper.. Best regards, Henrik |
From: Henrik J. <hen...@gm...> - 2009-11-04 09:37:05
|
On Wednesday 28 October 2009 11:23:22 bp wrote: > Hi, > > I'm a newbee user of pymagellan. I found it great. > However I'v installed it both on XP and Ubuntu. The XP version produced > invalid map files. > MapSend says: "Can not open map" though the linux version was ok. > Datasources and rule files were the same in both cases. > Than after a little search I found this topic: > http://sourceforge.net/tracker/?func=detail&aid=2350976&group_id=239832&ati > d=1111141 and applied the patch in Layer.py changing > tmplay = tempfile.NamedTemporaryFile('w') > to > tmplay = tempfile.NamedTemporaryFile('wb') > after applying the modification, the maps created on windows were ok. > I'v applied the modification on linux also. > MapSend can open both the windows and the linux version of maps. > So I think this patch sould be in svn. > > Regards > Peter Hi Peter, I have now fixed this problem in trunk. Thanks for reporting it. /Henrik |
From: Henrik J. <hen...@gm...> - 2009-11-04 09:30:38
|
Hi Peter, Thanks for taking the time to find the bug. I have checked in your fix but instead of putting it in Map.py I created an optimze method to the POIGroup and made the first part of the layer optimization code include POI groups in addition to the normal groups. Please try it out. /Henrik On Monday 02 November 2009 10:29:41 bp wrote: > Ok, after some day of debugging and trying to figure out how the code > works, I found that layer.optimize is called > for optimizing layers before closing them. Here cellelements could be > moved to new cells. > This method returns a dictionary with changes, however this result was > not used after optimizing POI layer. > Than when closing POI layer, POI features were referenced to the old > cell numbers, causing index error. > > To update POI features, here are the differencies in Map.py. > Henrik could you revise it? > > @@ -359,7 +359,7 @@ > > ## Optimize layers in groups > logging.info('Optimizing cell structure of normal layers') > - remaininglayers = list(self.layers + self._poiconfig.layers) > + remaininglayers = list(self.layers) > if self.groups != None: > for group in self.groups: > group.optimizeLayers() > @@ -380,8 +380,16 @@ > > > ## Optimize remaining layers > + > + for layer in self._poiconfig.layers: > + remapdict = layer.optimize() > + for feature in self._poigroup._features: > + if len(remapdict) > 0: > + feature.cellelementrefs = tuple([remapdict[ceref] > for ceref in feature.cellelementrefs]) > + > if self.maptype == MapTypeStreetRoute: > logging.info('Optimizing cell structure of routing layers') > + > for layer in remaininglayers: > layer.optimize() > > > Regards > Peter > > > Hi, > > > > I have a datasource with a huge number of POIs > > When I compile the map I get the following error: > > IndexError: num_in_cell (1136) is outside the # of cellelements (0) in > > cell 1, layer poi > > If I limit the number of POIs by filtering out some types in rule file, > > than map is compiled ok. > > > > Is this a limitation in the map format or a bug? > > > > ... > > DEBUG Optimizing layer poi > > DEBUG Max cell elements exceeded for layer poi. cellnum=1, # of cell > > elements=18994 > > DEBUG Max cell elements exceeded for layer poi. cellnum=1, # of cell > > elements=18994 > > DEBUG nlevels=2 for layer poi > > INFO Closing map > > Traceback (most recent call last): > > File "pymagellan\osmmagellan\osmmag.py", line 260, in <module> > > main() > > File "pymagellan\osmmagellan\osmmag.py", line 256, in main > > db=options.db > > File "pymagellan\osmmagellan\osmmag.py", line 97, in osmmag > > m.close() > > File "d:\Python26\lib\site-packages\magellan\Map.py", line 413, in > > close self._poigroup.close() > > File "d:\Python26\lib\site-packages\magellan\POI.py", line 201, in > > close for ref, e in zip(f.cellelementrefs, f.getCellElements(self.map)): > > File "d:\Python26\lib\site-packages\magellan\POI.py", line 518, in > > getCellElements > > return [layer.getCellElement(ceref) for ceref in > > self.cellelementrefs] File > > "d:\Python26\lib\site-packages\magellan\Layer.py", line 712, in > > getCellElement > > raise IndexError,"num_in_cell (%d) is outside the # of cellelements > > (%d) in cell %d, layer %s"%(num_in_cell,len(cell),cellnum, self.name) > > IndexError: num_in_cell (1136) is outside the # of cellelements (0) in > > cell 1, layer poi > |
From: bp <bp...@po...> - 2009-11-02 09:45:48
|
Ok, after some day of debugging and trying to figure out how the code works, I found that layer.optimize is called for optimizing layers before closing them. Here cellelements could be moved to new cells. This method returns a dictionary with changes, however this result was not used after optimizing POI layer. Than when closing POI layer, POI features were referenced to the old cell numbers, causing index error. To update POI features, here are the differencies in Map.py. Henrik could you revise it? @@ -359,7 +359,7 @@ ## Optimize layers in groups logging.info('Optimizing cell structure of normal layers') - remaininglayers = list(self.layers + self._poiconfig.layers) + remaininglayers = list(self.layers) if self.groups != None: for group in self.groups: group.optimizeLayers() @@ -380,8 +380,16 @@ ## Optimize remaining layers + + for layer in self._poiconfig.layers: + remapdict = layer.optimize() + for feature in self._poigroup._features: + if len(remapdict) > 0: + feature.cellelementrefs = tuple([remapdict[ceref] for ceref in feature.cellelementrefs]) + if self.maptype == MapTypeStreetRoute: logging.info('Optimizing cell structure of routing layers') + for layer in remaininglayers: layer.optimize() Regards Peter > Hi, > > I have a datasource with a huge number of POIs > When I compile the map I get the following error: > IndexError: num_in_cell (1136) is outside the # of cellelements (0) in > cell 1, layer poi > If I limit the number of POIs by filtering out some types in rule file, > than map is compiled ok. > > Is this a limitation in the map format or a bug? > > ... > DEBUG Optimizing layer poi > DEBUG Max cell elements exceeded for layer poi. cellnum=1, # of cell > elements=18994 > DEBUG Max cell elements exceeded for layer poi. cellnum=1, # of cell > elements=18994 > DEBUG nlevels=2 for layer poi > INFO Closing map > Traceback (most recent call last): > File "pymagellan\osmmagellan\osmmag.py", line 260, in <module> > main() > File "pymagellan\osmmagellan\osmmag.py", line 256, in main > db=options.db > File "pymagellan\osmmagellan\osmmag.py", line 97, in osmmag > m.close() > File "d:\Python26\lib\site-packages\magellan\Map.py", line 413, in close > self._poigroup.close() > File "d:\Python26\lib\site-packages\magellan\POI.py", line 201, in close > for ref, e in zip(f.cellelementrefs, f.getCellElements(self.map)): > File "d:\Python26\lib\site-packages\magellan\POI.py", line 518, in > getCellElements > return [layer.getCellElement(ceref) for ceref in self.cellelementrefs] > File "d:\Python26\lib\site-packages\magellan\Layer.py", line 712, in > getCellElement > raise IndexError,"num_in_cell (%d) is outside the # of cellelements > (%d) in cell %d, layer %s"%(num_in_cell,len(cell),cellnum, self.name) > IndexError: num_in_cell (1136) is outside the # of cellelements (0) in > cell 1, layer poi > |
From: bp <bp...@po...> - 2009-10-28 10:44:32
|
Hi, I have a datasource with a huge number of POIs When I compile the map I get the following error: IndexError: num_in_cell (1136) is outside the # of cellelements (0) in cell 1, layer poi If I limit the number of POIs by filtering out some types in rule file, than map is compiled ok. Is this a limitation in the map format or a bug? ... DEBUG Optimizing layer poi DEBUG Max cell elements exceeded for layer poi. cellnum=1, # of cell elements=18994 DEBUG Max cell elements exceeded for layer poi. cellnum=1, # of cell elements=18994 DEBUG nlevels=2 for layer poi INFO Closing map Traceback (most recent call last): File "pymagellan\osmmagellan\osmmag.py", line 260, in <module> main() File "pymagellan\osmmagellan\osmmag.py", line 256, in main db=options.db File "pymagellan\osmmagellan\osmmag.py", line 97, in osmmag m.close() File "d:\Python26\lib\site-packages\magellan\Map.py", line 413, in close self._poigroup.close() File "d:\Python26\lib\site-packages\magellan\POI.py", line 201, in close for ref, e in zip(f.cellelementrefs, f.getCellElements(self.map)): File "d:\Python26\lib\site-packages\magellan\POI.py", line 518, in getCellElements return [layer.getCellElement(ceref) for ceref in self.cellelementrefs] File "d:\Python26\lib\site-packages\magellan\Layer.py", line 712, in getCellElement raise IndexError,"num_in_cell (%d) is outside the # of cellelements (%d) in cell %d, layer %s"%(num_in_cell,len(cell),cellnum, self.name) IndexError: num_in_cell (1136) is outside the # of cellelements (0) in cell 1, layer poi Thanks in advance Regards Peter |
From: bp <bp...@po...> - 2009-10-28 10:40:47
|
Hi, I'm a newbee user of pymagellan. I found it great. However I'v installed it both on XP and Ubuntu. The XP version produced invalid map files. MapSend says: "Can not open map" though the linux version was ok. Datasources and rule files were the same in both cases. Than after a little search I found this topic: http://sourceforge.net/tracker/?func=detail&aid=2350976&group_id=239832&atid=1111141 and applied the patch in Layer.py changing tmplay = tempfile.NamedTemporaryFile('w') to tmplay = tempfile.NamedTemporaryFile('wb') after applying the modification, the maps created on windows were ok. I'v applied the modification on linux also. MapSend can open both the windows and the linux version of maps. So I think this patch sould be in svn. Regards Peter |
From: Mikael A. <mik...@gm...> - 2009-07-26 18:08:20
|
Great project! Definitely in my top ten list of open source projects here on sourceforge! I've stumbled on some points that causes MapSend to crash. The first node in the badPOI map is a shopping mall in Borlänge called "Kupolen". I've generated the map with the skimap.xml rules in the svn-tree. This makes the node a POI in the imi-file, and if this is present it will crash MapSend. The second node in the badPoint map is just a kindergarten in Linköping. The map is generated with the osmmagrules.xml rules. This will only add the node as a named point in the imi-file, but it seems to be enough to put MapSend out of its misery. It seems though that the problem only exist if I request that the names should be added (with --name-tag-list=int_name,name). If I omit this MapSend will display the map without any problem. I hope that this helps, Mikael Arvids |
From: henrik j. <hen...@gm...> - 2009-06-27 13:05:01
|
Hi, Thanks for reporting the problem and sorry about the slow reply. The problem is because of a restriction I added sometime ago for a certain polygon type. Unfortunately I don't remember why I added the restriction. In the latest trunk I have removed it and instead of exiting it prints a warning. Hopefully it will work but it could be that it won't work on all devices. Best regards, Henrik 2009/6/20 ouɐɯnH <fre...@gm...>: > hello i test to a map generete from geofabrick .osm > http://download.geofabrik.de/osm/south-america/colombia.osm.bz2 but i > have this error: > > debian:# osmmag.py -v -n "Colombia 20090620" -o colombia_20090620.imi > -r osmmagellan/data/osmmagrules.xml colombia.osm > INFO Loading rules: osmmagellan/data/osmmagrules.xml > INFO Reading osm data and creating map > INFO Optimizing cell structure > Traceback (most recent call last): > File "/usr/bin/osmmag.py", line 180, in <module> > main() > File "/usr/bin/osmmag.py", line 176, in main > bigendian=options.bigendian > File "/usr/bin/osmmag.py", line 61, in osmmag > m.close() > File "/usr/lib/python2.5/site-packages/magellan/Map.py", line 358, in close > self._laycfg.close() > File "/usr/lib/python2.5/site-packages/magellan/Layer.py", line 278, in close > layer.close() > File "/usr/lib/python2.5/site-packages/magellan/Layer.py", line 466, in close > celldata = cell.serialize() > File "/usr/lib/python2.5/site-packages/magellan/Cell.py", line 168, in > serialize > data += self._serialize_cellelement(s) > File "/usr/lib/python2.5/site-packages/magellan/Cell.py", line 85, in > _serialize_cellelement > cellelementdata = cellelement.serialize(self, self.layer.bigendian) > File "/usr/lib/python2.5/site-packages/magellan/CellElement.py", line > 465, in serialize > cdata, subpolytype, nvertices = self.encode_polygon(bbox, p, bigendian) > File "/usr/lib/python2.5/site-packages/magellan/CellElement.py", line > 624, in encode_polygon > raise Exception("Cannot encode polygon") > Exception: Cannot encode polygon > > but with the export from > http://www.openstreetmap.org/export?lat=4.6924&lon=-74.1438&zoom=14&layers=B000FTFT > the script works well > > the problem is ; i need all the country. > > thanks for the help > humano > -- > Lee un artículo sobre nosotros en el tiempo: > http://www.eltiempo.com/colombia/bogota/empresas-de-tecnologia-basadas-en-software-libre-se-expanden-en-bogota_4708463-1 > > ------------------------------------------------------------------------------ > Are you an open source citizen? Join us for the Open Source Bridge conference! > Portland, OR, June 17-19. Two days of sessions, one day of unconference: $250. > Need another reason to go? 24-hour hacker lounge. Register today! > http://ad.doubleclick.net/clk;215844324;13503038;v?http://opensourcebridge.org > _______________________________________________ > Pymag-devel mailing list > Pym...@li... > https://lists.sourceforge.net/lists/listinfo/pymag-devel > |
From: ouɐɯnH <fre...@gm...> - 2009-06-20 16:45:17
|
hello i test to a map generete from geofabrick .osm http://download.geofabrik.de/osm/south-america/colombia.osm.bz2 but i have this error: debian:# osmmag.py -v -n "Colombia 20090620" -o colombia_20090620.imi -r osmmagellan/data/osmmagrules.xml colombia.osm INFO Loading rules: osmmagellan/data/osmmagrules.xml INFO Reading osm data and creating map INFO Optimizing cell structure Traceback (most recent call last): File "/usr/bin/osmmag.py", line 180, in <module> main() File "/usr/bin/osmmag.py", line 176, in main bigendian=options.bigendian File "/usr/bin/osmmag.py", line 61, in osmmag m.close() File "/usr/lib/python2.5/site-packages/magellan/Map.py", line 358, in close self._laycfg.close() File "/usr/lib/python2.5/site-packages/magellan/Layer.py", line 278, in close layer.close() File "/usr/lib/python2.5/site-packages/magellan/Layer.py", line 466, in close celldata = cell.serialize() File "/usr/lib/python2.5/site-packages/magellan/Cell.py", line 168, in serialize data += self._serialize_cellelement(s) File "/usr/lib/python2.5/site-packages/magellan/Cell.py", line 85, in _serialize_cellelement cellelementdata = cellelement.serialize(self, self.layer.bigendian) File "/usr/lib/python2.5/site-packages/magellan/CellElement.py", line 465, in serialize cdata, subpolytype, nvertices = self.encode_polygon(bbox, p, bigendian) File "/usr/lib/python2.5/site-packages/magellan/CellElement.py", line 624, in encode_polygon raise Exception("Cannot encode polygon") Exception: Cannot encode polygon but with the export from http://www.openstreetmap.org/export?lat=4.6924&lon=-74.1438&zoom=14&layers=B000FTFT the script works well the problem is ; i need all the country. thanks for the help humano -- Lee un artículo sobre nosotros en el tiempo: http://www.eltiempo.com/colombia/bogota/empresas-de-tecnologia-basadas-en-software-libre-se-expanden-en-bogota_4708463-1 |
From: Josh <jo...@fe...> - 2009-06-05 13:29:34
|
That looks a bit better... The map built without error this time, but crashes mapsend so I can only guess it won't work too well on the GPSr. I'll have a muck around today and try to work out which layer is causing the problem. Here's the output from this attempt, anything look bad? I assume the nlevels=2 means that it's worked out another level is needed? INFO Create hydro polygons from coastline INFO Optimizing cell structure of normal layers DEBUG Optimizing layer 00_Freeways DEBUG nlevels=0 for layer 00_Freeways DEBUG Optimizing layer 00_Major_Highways DEBUG nlevels=2 for layer 00_Major_Highways DEBUG Optimizing layer 00_Minor_Highways DEBUG Max cell elements exceeded for layer 00_Minor_Highways. cellnum=1, # of cell elements=3103 DEBUG Max cell elements exceeded for layer 00_Minor_Highways. cellnum=1, # of cell elements=3103 DEBUG nlevels=2 for layer 00_Minor_Highways DEBUG Optimizing layer 00_Major_Roads DEBUG Max cell elements exceeded for layer 00_Major_Roads. cellnum=1, # of cell elements=5700 DEBUG Max cell elements exceeded for layer 00_Major_Roads. cellnum=1, # of cell elements=5700 DEBUG nlevels=2 for layer 00_Major_Roads DEBUG Optimizing layer 00_Streets DEBUG Max cell elements exceeded for layer 00_Streets. cellnum=1, # of cell elements=81942 DEBUG Max cell elements exceeded for layer 00_Streets. cellnum=1, # of cell elements=81942 DEBUG nlevels=2 for layer 00_Streets DEBUG Optimizing layer 00_Trails_4WD DEBUG nlevels=0 for layer 00_Trails_4WD DEBUG Optimizing layer 00_Railroads DEBUG nlevels=0 for layer 00_Railroads DEBUG Optimizing layer 00_Hydro_Polygons DEBUG nlevels=0 for layer 00_Hydro_Polygons DEBUG Optimizing layer 00_Hydro_Lines DEBUG nlevels=2 for layer 00_Hydro_Lines DEBUG Optimizing layer 00_Parks DEBUG nlevels=0 for layer 00_Parks DEBUG Optimizing layer 00_Trails DEBUG Max cell elements exceeded for layer 00_Trails. cellnum=1, # of cell elements=5417 DEBUG Max cell elements exceeded for layer 00_Trails. cellnum=1, # of cell elements=5417 DEBUG nlevels=2 for layer 00_Trails DEBUG Optimizing layer 00_Buildings DEBUG nlevels=0 for layer 00_Buildings DEBUG Optimizing layer 00_Farm DEBUG nlevels=0 for layer 00_Farm DEBUG Optimizing layer 00_Points DEBUG nlevels=0 for layer 00_Points DEBUG Optimizing layer poi DEBUG nlevels=0 for layer poi INFO Closing map Cheers, Josh Quoting henrik johansson <hen...@gm...>: > Thanks! > > I think I found the bug, try now. > > /Henrik |
From: henrik j. <hen...@gm...> - 2009-06-04 05:55:19
|
Thanks! I think I found the bug, try now. /Henrik 2009/6/4 Josh <jo...@fe...>: > Hi Henrik, > > Here's today's output. > > INFO Optimizing cell structure of normal layers > DEBUG Optimizing layer 00_Freeways > DEBUG nlevels=0 for layer 00_Freeways > DEBUG Optimizing layer 00_Major_Highways > DEBUG nlevels=1 for layer 00_Major_Highways > DEBUG Optimizing layer 00_Minor_Highways > DEBUG Max cell elements exceeded for layer 00_Minor_Highways. cellnum=1, # > of cell elements=3103 > DEBUG nlevels=1 for layer 00_Minor_Highways > DEBUG Optimizing layer 00_Major_Roads > DEBUG Max cell elements exceeded for layer 00_Major_Roads. cellnum=1, # of > cell elements=5700 > DEBUG nlevels=1 for layer 00_Major_Roads > DEBUG Optimizing layer 00_Streets > DEBUG Max cell elements exceeded for layer 00_Streets. cellnum=1, # of cell > elements=81942 > DEBUG nlevels=1 for layer 00_Streets > Traceback (most recent call last): > File "/usr/bin/osmmag.py", line 260, in <module> > main() > File "/usr/bin/osmmag.py", line 256, in main > db=options.db > File "/usr/bin/osmmag.py", line 97, in osmmag > m.close() > File "pymagellan/trunk/magellan/Map.py", line 365, in close > group.optimizeLayers() > File "pymagellan/trunk/magellan/SearchGroup.py", line 116, in > optimizeLayers > cellrefremap[self.map.getLayerIndex(layer)] = layer.optimize() > File "pymagellan/trunk/magellan/Layer.py", line 473, in optimize > newcellrefs = self.addCellElement(ce) > File "pymagellan/trunk/magellan/Layer.py", line 745, in addCellElement > assert self.nlevels == 0 or nincell < 2**16 > AssertionError > > > Cheers, > Josh > > > Quoting henrik johansson <hen...@gm...>: > >> Hi Josh, >> >> I found that this assertion was not correct. I added a new option that >> gives more verbose output. >> >> Can you please try again with the --debug option? >> >> Regards, >> >> 2009/6/3 Josh <jo...@fe...>: >>> >>> Hi Henrik, >>> >>> It looks like your guess was right - here's the output from svn trunk >>> 28 on the same map build as yesterday: >>> >>> Traceback (most recent call last): >>> File "/usr/bin/osmmag.py", line 244, in <module> >>> main() >>> File "/usr/bin/osmmag.py", line 240, in main >>> fromdb=options.fromdb >>> File "/usr/bin/osmmag.py", line 84, in osmmag >>> data.load() >>> File "osmmagellan/osm.py", line 199, in load >>> parser.parse(self.filename) >>> File "/usr/lib/python2.5/xml/sax/expatreader.py", line 107, in parse >>> xmlreader.IncrementalParser.parse(self, source) >>> File "/usr/lib/python2.5/xml/sax/xmlreader.py", line 123, in parse >>> self.feed(buffer) >>> File "/usr/lib/python2.5/xml/sax/expatreader.py", line 207, in feed >>> self._parser.Parse(data, isFinal) >>> File "/usr/lib/python2.5/xml/sax/expatreader.py", line 304, in >>> end_element >>> self._cont_handler.endElement(name) >>> File "osmmagellan/osm.py", line 247, in endElement >>> self.add_element(statement, self.tags, coords) >>> File "osmmagellan/osm.py", line 105, in add_element >>> cellelementrefs = layer.addCellElement(cellelement) >>> File "magellan/Layer.py", line 745, in addCellElement >>> assert nincell < 2**16 >>> AssertionError >>> >>> >>> Cheers, >>> Josh >>> >>> >>> >>> Quoting henrik johansson <hen...@gm...>: >>> >>>> Hi Josh, >>>> >>>> Thanks for testing. >>>> >>>> I think I know what the problem is. There's a limit of 64k cell >>>> elements in a cell. So it's clearly a pymagellan fault since it could >>>> just increase the number of cell levels if it reaches this limit. The >>>> threshold is set to max 2000 elements per cell but I think this might >>>> not be respected for some reason. >>>> >>>> I added some more asserts that should catch this problem. >>>> >>>> /Henrik >>> >>> >>> >>> >>> >>> >>> ------------------------------------------------------------------------------ >>> OpenSolaris 2009.06 is a cutting edge operating system for enterprises >>> looking to deploy the next generation of Solaris that includes the latest >>> innovations from Sun and the OpenSource community. Download a copy and >>> enjoy capabilities such as Networking, Storage and Virtualization. >>> Go to: http://p.sf.net/sfu/opensolaris-get >>> _______________________________________________ >>> Pymag-devel mailing list >>> Pym...@li... >>> https://lists.sourceforge.net/lists/listinfo/pymag-devel >>> >> >> >> ------------------------------------------------------------------------------ >> OpenSolaris 2009.06 is a cutting edge operating system for enterprises >> looking to deploy the next generation of Solaris that includes the latest >> innovations from Sun and the OpenSource community. Download a copy and >> enjoy capabilities such as Networking, Storage and Virtualization. >> Go to: http://p.sf.net/sfu/opensolaris-get >> _______________________________________________ >> Pymag-devel mailing list >> Pym...@li... >> https://lists.sourceforge.net/lists/listinfo/pymag-devel >> > > > > |
From: Josh <jo...@fe...> - 2009-06-03 22:06:04
|
Hi Henrik, Here's today's output. INFO Optimizing cell structure of normal layers DEBUG Optimizing layer 00_Freeways DEBUG nlevels=0 for layer 00_Freeways DEBUG Optimizing layer 00_Major_Highways DEBUG nlevels=1 for layer 00_Major_Highways DEBUG Optimizing layer 00_Minor_Highways DEBUG Max cell elements exceeded for layer 00_Minor_Highways. cellnum=1, # of cell elements=3103 DEBUG nlevels=1 for layer 00_Minor_Highways DEBUG Optimizing layer 00_Major_Roads DEBUG Max cell elements exceeded for layer 00_Major_Roads. cellnum=1, # of cell elements=5700 DEBUG nlevels=1 for layer 00_Major_Roads DEBUG Optimizing layer 00_Streets DEBUG Max cell elements exceeded for layer 00_Streets. cellnum=1, # of cell elements=81942 DEBUG nlevels=1 for layer 00_Streets Traceback (most recent call last): File "/usr/bin/osmmag.py", line 260, in <module> main() File "/usr/bin/osmmag.py", line 256, in main db=options.db File "/usr/bin/osmmag.py", line 97, in osmmag m.close() File "pymagellan/trunk/magellan/Map.py", line 365, in close group.optimizeLayers() File "pymagellan/trunk/magellan/SearchGroup.py", line 116, in optimizeLayers cellrefremap[self.map.getLayerIndex(layer)] = layer.optimize() File "pymagellan/trunk/magellan/Layer.py", line 473, in optimize newcellrefs = self.addCellElement(ce) File "pymagellan/trunk/magellan/Layer.py", line 745, in addCellElement assert self.nlevels == 0 or nincell < 2**16 AssertionError Cheers, Josh Quoting henrik johansson <hen...@gm...>: > Hi Josh, > > I found that this assertion was not correct. I added a new option that > gives more verbose output. > > Can you please try again with the --debug option? > > Regards, > > 2009/6/3 Josh <jo...@fe...>: >> Hi Henrik, >> >> It looks like your guess was right - here's the output from svn trunk >> 28 on the same map build as yesterday: >> >> Traceback (most recent call last): >> File "/usr/bin/osmmag.py", line 244, in <module> >> main() >> File "/usr/bin/osmmag.py", line 240, in main >> fromdb=options.fromdb >> File "/usr/bin/osmmag.py", line 84, in osmmag >> data.load() >> File "osmmagellan/osm.py", line 199, in load >> parser.parse(self.filename) >> File "/usr/lib/python2.5/xml/sax/expatreader.py", line 107, in parse >> xmlreader.IncrementalParser.parse(self, source) >> File "/usr/lib/python2.5/xml/sax/xmlreader.py", line 123, in parse >> self.feed(buffer) >> File "/usr/lib/python2.5/xml/sax/expatreader.py", line 207, in feed >> self._parser.Parse(data, isFinal) >> File "/usr/lib/python2.5/xml/sax/expatreader.py", line 304, in end_element >> self._cont_handler.endElement(name) >> File "osmmagellan/osm.py", line 247, in endElement >> self.add_element(statement, self.tags, coords) >> File "osmmagellan/osm.py", line 105, in add_element >> cellelementrefs = layer.addCellElement(cellelement) >> File "magellan/Layer.py", line 745, in addCellElement >> assert nincell < 2**16 >> AssertionError >> >> >> Cheers, >> Josh >> >> >> >> Quoting henrik johansson <hen...@gm...>: >> >>> Hi Josh, >>> >>> Thanks for testing. >>> >>> I think I know what the problem is. There's a limit of 64k cell >>> elements in a cell. So it's clearly a pymagellan fault since it could >>> just increase the number of cell levels if it reaches this limit. The >>> threshold is set to max 2000 elements per cell but I think this might >>> not be respected for some reason. >>> >>> I added some more asserts that should catch this problem. >>> >>> /Henrik >> >> >> >> >> >> ------------------------------------------------------------------------------ >> OpenSolaris 2009.06 is a cutting edge operating system for enterprises >> looking to deploy the next generation of Solaris that includes the latest >> innovations from Sun and the OpenSource community. Download a copy and >> enjoy capabilities such as Networking, Storage and Virtualization. >> Go to: http://p.sf.net/sfu/opensolaris-get >> _______________________________________________ >> Pymag-devel mailing list >> Pym...@li... >> https://lists.sourceforge.net/lists/listinfo/pymag-devel >> > > ------------------------------------------------------------------------------ > OpenSolaris 2009.06 is a cutting edge operating system for enterprises > looking to deploy the next generation of Solaris that includes the latest > innovations from Sun and the OpenSource community. Download a copy and > enjoy capabilities such as Networking, Storage and Virtualization. > Go to: http://p.sf.net/sfu/opensolaris-get > _______________________________________________ > Pymag-devel mailing list > Pym...@li... > https://lists.sourceforge.net/lists/listinfo/pymag-devel > |
From: henrik j. <hen...@gm...> - 2009-06-03 19:59:32
|
Hi Josh, I found that this assertion was not correct. I added a new option that gives more verbose output. Can you please try again with the --debug option? Regards, 2009/6/3 Josh <jo...@fe...>: > Hi Henrik, > > It looks like your guess was right - here's the output from svn trunk > 28 on the same map build as yesterday: > > Traceback (most recent call last): > File "/usr/bin/osmmag.py", line 244, in <module> > main() > File "/usr/bin/osmmag.py", line 240, in main > fromdb=options.fromdb > File "/usr/bin/osmmag.py", line 84, in osmmag > data.load() > File "osmmagellan/osm.py", line 199, in load > parser.parse(self.filename) > File "/usr/lib/python2.5/xml/sax/expatreader.py", line 107, in parse > xmlreader.IncrementalParser.parse(self, source) > File "/usr/lib/python2.5/xml/sax/xmlreader.py", line 123, in parse > self.feed(buffer) > File "/usr/lib/python2.5/xml/sax/expatreader.py", line 207, in feed > self._parser.Parse(data, isFinal) > File "/usr/lib/python2.5/xml/sax/expatreader.py", line 304, in end_element > self._cont_handler.endElement(name) > File "osmmagellan/osm.py", line 247, in endElement > self.add_element(statement, self.tags, coords) > File "osmmagellan/osm.py", line 105, in add_element > cellelementrefs = layer.addCellElement(cellelement) > File "magellan/Layer.py", line 745, in addCellElement > assert nincell < 2**16 > AssertionError > > > Cheers, > Josh > > > > Quoting henrik johansson <hen...@gm...>: > >> Hi Josh, >> >> Thanks for testing. >> >> I think I know what the problem is. There's a limit of 64k cell >> elements in a cell. So it's clearly a pymagellan fault since it could >> just increase the number of cell levels if it reaches this limit. The >> threshold is set to max 2000 elements per cell but I think this might >> not be respected for some reason. >> >> I added some more asserts that should catch this problem. >> >> /Henrik > > > > > > ------------------------------------------------------------------------------ > OpenSolaris 2009.06 is a cutting edge operating system for enterprises > looking to deploy the next generation of Solaris that includes the latest > innovations from Sun and the OpenSource community. Download a copy and > enjoy capabilities such as Networking, Storage and Virtualization. > Go to: http://p.sf.net/sfu/opensolaris-get > _______________________________________________ > Pymag-devel mailing list > Pym...@li... > https://lists.sourceforge.net/lists/listinfo/pymag-devel > |
From: Josh <jo...@fe...> - 2009-06-02 22:43:53
|
Hi Henrik, It looks like your guess was right - here's the output from svn trunk 28 on the same map build as yesterday: Traceback (most recent call last): File "/usr/bin/osmmag.py", line 244, in <module> main() File "/usr/bin/osmmag.py", line 240, in main fromdb=options.fromdb File "/usr/bin/osmmag.py", line 84, in osmmag data.load() File "osmmagellan/osm.py", line 199, in load parser.parse(self.filename) File "/usr/lib/python2.5/xml/sax/expatreader.py", line 107, in parse xmlreader.IncrementalParser.parse(self, source) File "/usr/lib/python2.5/xml/sax/xmlreader.py", line 123, in parse self.feed(buffer) File "/usr/lib/python2.5/xml/sax/expatreader.py", line 207, in feed self._parser.Parse(data, isFinal) File "/usr/lib/python2.5/xml/sax/expatreader.py", line 304, in end_element self._cont_handler.endElement(name) File "osmmagellan/osm.py", line 247, in endElement self.add_element(statement, self.tags, coords) File "osmmagellan/osm.py", line 105, in add_element cellelementrefs = layer.addCellElement(cellelement) File "magellan/Layer.py", line 745, in addCellElement assert nincell < 2**16 AssertionError Cheers, Josh Quoting henrik johansson <hen...@gm...>: > Hi Josh, > > Thanks for testing. > > I think I know what the problem is. There's a limit of 64k cell > elements in a cell. So it's clearly a pymagellan fault since it could > just increase the number of cell levels if it reaches this limit. The > threshold is set to max 2000 elements per cell but I think this might > not be respected for some reason. > > I added some more asserts that should catch this problem. > > /Henrik |
From: henrik j. <hen...@gm...> - 2009-06-02 19:15:00
|
Hi Josh, Thanks for testing. I think I know what the problem is. There's a limit of 64k cell elements in a cell. So it's clearly a pymagellan fault since it could just increase the number of cell levels if it reaches this limit. The threshold is set to max 2000 elements per cell but I think this might not be respected for some reason. I added some more asserts that should catch this problem. /Henrik 2009/6/2 Josh <jo...@fe...>: - Show quoted text - 2009/6/2 Josh <jo...@fe...>: > Quoting henrik johansson <hen...@gm...>: > >> Hi, >> >> I have now added bounding box support for the database reader. >> >> Think it's high time to make another release. It would be nice if you >> could test the latest trunk to see if it still works for you. >> >> /Henrik > > Hi Henrik, > > I've done a few tests with the current svn version today, and it looks good. > I haven't tried the maps on a GPSr yet but at least they don't crash > mapsend ;) > Most polygons are rendering now. I haven't tested the bounding box or > pgsql yet. > > > On another note, I've been getting an error for a while on one > particular map I've been building: > > magellan/DBUtil.py:190: DeprecationWarning: 'H' format requires 0 <= > number <= 65535 > return apply(struct.pack, (structendian+types,) + data) > magellan/Layer.py:646: DeprecationWarning: 'H' format requires 0 <= > number <= 65535 > return struct.pack(prefix+types, *data) > > I *think* this is because there are more than 64k > residential/unclassified roads in the osm extract going in to a > single layer. > Is this a limitation of the magellan map format, or in pymag? > In an attempt to overcome this in the past I've split the roads into > multiple layers, and that builds successfuly. > The map can be opened in Mapsend and Vantagepoint, but locks up GPSRs > (tested on half a dozen explorists) as soon as you select the detail > map. > I don't know if this is related or a different problem. > Any hints on diagnosing the problem other than trial-and-error > exclusion of objects? > > Cheers, > Josh > > > > > > > ------------------------------------------------------------------------------ > OpenSolaris 2009.06 is a cutting edge operating system for enterprises > looking to deploy the next generation of Solaris that includes the latest > innovations from Sun and the OpenSource community. Download a copy and > enjoy capabilities such as Networking, Storage and Virtualization. > Go to: http://p.sf.net/sfu/opensolaris-get > _______________________________________________ > Pymag-devel mailing list > Pym...@li... > https://lists.sourceforge.net/lists/listinfo/pymag-devel > |