mapyrus-users Mailing List for mapyrus
Brought to you by:
simoc
You can subscribe to this list here.
| 2006 |
Jan
|
Feb
|
Mar
(2) |
Apr
|
May
(2) |
Jun
|
Jul
(4) |
Aug
(3) |
Sep
(2) |
Oct
(4) |
Nov
(2) |
Dec
(1) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2007 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(2) |
Jun
(11) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2008 |
Jan
|
Feb
(2) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2010 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
|
| 2011 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(3) |
Sep
|
Oct
|
Nov
|
Dec
|
|
From: Simon C. <sim...@ya...> - 2011-08-21 18:18:18
|
Cai,
1. The example on p.100 is running Mapyrus as a web server without Tomcat.
In this example, you create the file tutorialwms1.mapyrus with Mapyrus
commands and the web page tutorialwms1.html with an OpenLayers map.
Then you start Mapyrus with the command:
java -classpath mapyrus.jar org.mapyrus.Mapyrus -s 8410
Mapyrus listens on port 8410 for HTTP requests.
Then I enter the following URL:
http://localhost:8410/tutorialwms1.html
This web page uses OpenLayers. OpenLayers calls Mapyrus
with URL http://localhost:8410/tutorialwms1.mapyrus.
Mapyrus reads the commands from tutorialwms1.mapyrus, creates
the image, and returns it to OpenLayers in the web browser:
Maybe this method is suitable for you? Maybe you must use Tomcat?
2. If you work with Tomcat, then you must pass the Mapyrus commands
in the URL:
layer = new OpenLayers.Layer.WMS( "Countries",
"servlet", {commands: commands, format: "image/png"});
You can also use the JavaScript encodeURIComponent() function:
layer = new OpenLayers.Layer.WMS( "Countries",
"servlet?commands=" + encodeURIComponent(commands),
{format: "image/png"});
or,
layer = new OpenLayers.Layer.WMS( "Countries",
"http://localhost:8080/mapyrus/servlet?format=image/png&commands=" + encodeURIComponent(commands));
Simon Chenery.
Mapyrus Developer
--- On Sun, 8/21/11, 蔡志明 <ca...@16...> wrote:
From: 蔡志明 <ca...@16...>
Subject: 2011082103New Question
To: "Simon Chenery" <sim...@ya...>
Date: Sunday, August 21, 2011, 5:23 PM
Hello,
I have do research on geoserver these days. I have put geoserver.war in Tomcat and it can run without any configuration.
I just use several lines in my Web Project when I want to call geoserver WMS.
map = new OpenLayers.Map('area');
var wmsLayer = new OpenLayers.Layer.WMS( "OpenLayers WMS",
"http://localhost/geoserver/wms", {layers: 'Baselayers:fjshijie'} );
map.addLayer(wmsLayer);//
I have detected these lines in your manual(4.45 p100):
map = new OpenLayers.Map("map");
layer = new OpenLayers.Layer.WMS("Countries",
"http://localhost:8410/tutorialwms1.mapyrus", {format: "image/png"});
map.addLayer(layer);
map.setCenter(new OpenLayers.LonLat(5, 40), 5);
There is no "servlet".It is the same as geoserver.
But you send me the following lines which are different from p100:
MAPYRUS.layer1 = new OpenLayers.Layer.WMS("Countries",
"servlet",
{commands: MAPYRUS.commands1, format: "image/png"}
My question is:
How can I do if I want to do as p100 in your tutorial? This is just my interest.
Cai
在2011-08-21,"Simon Chenery" <sim...@ya...> 写道:
-----原始邮件-----
发件人:"Simon Chenery" <sim...@ya...>
发送时间:2011年8月21日 星期日
收件人:"蔡志明" <ca...@16...>
抄送:"Mapyrus Users" <map...@li...>
主题:Re: 2011082102New Questions
Hello Cai,
1. Yes, Mapyrus runs as an independent WMS server.
You must pass the Mapyrus commands to create the map display in the URL:
MAPYRUS.layer1 = new OpenLayers.Layer.WMS("Countries", "servlet",
{commands: MAPYRUS.commands1, format: "image/png"});
In this way, you can display any data, in any colour, in any style
by changing the JavaScript.
Other software (for example, Geoserver) stores configuration in the
Tomcat server. Then a short URL can be used to create the layer
from OpenLayers.
Mapyrus stores no configuration in Tomcat.
2. There are two ways of running Mapyrus as a web server:
a) Mapyrus runs as a web server without Tomcat.
This is described in sections 4.39 to 4.45 in the manual.
You start Mapyrus and it runs continuously as a web server:
> java -classpath ../mapyrus.jar org.mapyrus.Mapyrus -s 8410
Mapyrus 1.106 11-August-2011
Number of threads available to HTTP server: 8
Accepting HTTP requests on port: 8410
2011.08.21 15:52:06.275 INFO: Thread-4: HTTP header: GET /foo.mapyrus HTTP/1.1
When you make a request to http://localhost:8410/foo.mapyrus
then the Mapyrus reads commands from the file foo.mapyrus,
runs the commands, and sends the output to the web browser.
b) mapyrus.war runs as a web application in Tomcat.
This is described in section 4.46 in the manual.
Deploy the WAR file in Tomcat, then you can pass Mapyrus
commands to generate the map display in the URL.
Because of Tomcat security it is difficult to save data and
configuration inside Tomcat. The Mapyrus solution is to
pass all commands in the URL so there is no configuration
in Tomcat.
Decide which method you want to use.
Simon Chenery.
Mapyrus Developer
--- OnSun, 8/21/11, 蔡志明<ca...@16...>wrote:
From: 蔡志明 <ca...@16...>
Subject: 2011082102New Questions
To: "Simon Chenery" <sim...@ya...>
Date: Sunday, August 21, 2011, 10:00 AM
Hello Chenery,
Thanks for your replies.I have new questions.Please see attachment.
Cai
> -----原始邮件-----
> 发件人: "Simon Chenery" <sim...@ya...>
> 发送时间: 2011年8月21日 星期日
> 收件人: "蔡志明" <ca...@16...>
> 抄送:map...@li...
> 主题: Re: 20110821Mapyrus Questions
>
> Hello Cai,
>
> --- On Sun, 8/21/11, 蔡志明 <ca...@16...> wrote:
> >
> > Hello Chenery,
> > I have found the instruction in your tutorial for hging clone source.
>
> You can view the source code online at:
>
> http://mapyrus.hg.sourceforge.net/hgweb/mapyrus/mapyrus
>
> Click the 'files' link to see the files and directories.
>
> The source code can be checked out using the Mercurial
> version control tool:
>
> hg clone http://mapyrus.hg.sourceforge.net:8000/hgroot/mapyrus/mapyrus
>
> > I still have one question:
> > How to change the size of map tile?
> > Cai
>
> Setting the tile size is an OpenLayers function.
> The JavaScript command to set it is:
>
> MAPYRUS.map = new OpenLayers.Map('map', {tileSize: new OpenLayers.Size(512, 512)});
>
> Another solution is to use the 'singleTile' and 'ratio' options for the
> WMS layer to load exactly the area in the map:
>
> MAPYRUS.layer1 = new OpenLayers.Layer.WMS("Countries",
> "servlet",
> {commands: MAPYRUS.commands1, format: "image/png"}, {singleTile: true, ratio:1});
>
>
> Simon Chenery.
> Mapyrus Developer
|
|
From: Simon C. <sim...@ya...> - 2011-08-21 13:58:48
|
Hello Cai,
1. Yes, Mapyrus runs as an independent WMS server.
You must pass the Mapyrus commands to create the map display in the URL:
MAPYRUS.layer1 = new OpenLayers.Layer.WMS("Countries", "servlet",
{commands: MAPYRUS.commands1, format: "image/png"});
In this way, you can display any data, in any colour, in any style
by changing the JavaScript.
Other software (for example, Geoserver) stores configuration in the
Tomcat server. Then a short URL can be used to create the layer
from OpenLayers.
Mapyrus stores no configuration in Tomcat.
2. There are two ways of running Mapyrus as a web server:
a) Mapyrus runs as a web server without Tomcat.
This is described in sections 4.39 to 4.45 in the manual.
You start Mapyrus and it runs continuously as a web server:
> java -classpath ../mapyrus.jar org.mapyrus.Mapyrus -s 8410
Mapyrus 1.106 11-August-2011
Number of threads available to HTTP server: 8
Accepting HTTP requests on port: 8410
2011.08.21 15:52:06.275 INFO: Thread-4: HTTP header: GET /foo.mapyrus HTTP/1.1
When you make a request to http://localhost:8410/foo.mapyrus
then the Mapyrus reads commands from the file foo.mapyrus,
runs the commands, and sends the output to the web browser.
b) mapyrus.war runs as a web application in Tomcat.
This is described in section 4.46 in the manual.
Deploy the WAR file in Tomcat, then you can pass Mapyrus
commands to generate the map display in the URL.
Because of Tomcat security it is difficult to save data and
configuration inside Tomcat. The Mapyrus solution is to
pass all commands in the URL so there is no configuration
in Tomcat.
Decide which method you want to use.
Simon Chenery.
Mapyrus Developer
--- On Sun, 8/21/11, 蔡志明 <ca...@16...> wrote:
From: 蔡志明 <ca...@16...>
Subject: 2011082102New Questions
To: "Simon Chenery" <sim...@ya...>
Date: Sunday, August 21, 2011, 10:00 AM
Hello Chenery,
Thanks for your replies.I have new questions.Please see attachment.
Cai
> -----原始邮件-----
> 发件人: "Simon Chenery" <sim...@ya...>
> 发送时间: 2011年8月21日 星期日
> 收件人: "蔡志明" <ca...@16...>
> 抄送: map...@li...
> 主题: Re: 20110821Mapyrus Questions
>
> Hello Cai,
>
> --- On Sun, 8/21/11, 蔡志明 <ca...@16...> wrote:
> >
> > Hello Chenery,
> > I have found the instruction in your tutorial for hging clone source.
>
> You can view the source code online at:
>
> http://mapyrus.hg.sourceforge.net/hgweb/mapyrus/mapyrus
>
> Click the 'files' link to see the files and directories.
>
> The source code can be checked out using the Mercurial
> version control tool:
>
> hg clone http://mapyrus.hg.sourceforge.net:8000/hgroot/mapyrus/mapyrus
>
> > I still have one question:
> > How to change the size of map tile?
> > Cai
>
> Setting the tile size is an OpenLayers function.
> The JavaScript command to set it is:
>
> MAPYRUS.map = new OpenLayers.Map('map', {tileSize: new OpenLayers.Size(512, 512)});
>
> Another solution is to use the 'singleTile' and 'ratio' options for the
> WMS layer to load exactly the area in the map:
>
> MAPYRUS.layer1 = new OpenLayers.Layer.WMS("Countries",
> "servlet",
> {commands: MAPYRUS.commands1, format: "image/png"}, {singleTile: true, ratio:1});
>
>
> Simon Chenery.
> Mapyrus Developer
|
|
From: Simon C. <sim...@ya...> - 2011-08-21 07:11:42
|
Hello Cai, --- On Sun, 8/21/11, 蔡志明 <ca...@16...> wrote: > > Hello Chenery, > I have found the instruction in your tutorial for hging clone source. You can view the source code online at: http://mapyrus.hg.sourceforge.net/hgweb/mapyrus/mapyrus Click the 'files' link to see the files and directories. The source code can be checked out using the Mercurial version control tool: hg clone http://mapyrus.hg.sourceforge.net:8000/hgroot/mapyrus/mapyrus > I still have one question: > How to change the size of map tile? > Cai Setting the tile size is an OpenLayers function. The JavaScript command to set it is: MAPYRUS.map = new OpenLayers.Map('map', {tileSize: new OpenLayers.Size(512, 512)}); Another solution is to use the 'singleTile' and 'ratio' options for the WMS layer to load exactly the area in the map: MAPYRUS.layer1 = new OpenLayers.Layer.WMS("Countries", "servlet", {commands: MAPYRUS.commands1, format: "image/png"}, {singleTile: true, ratio:1}); Simon Chenery. Mapyrus Developer |
|
From: Mattias X G. <Mat...@sg...> - 2010-08-06 10:08:14
|
Hello, We are using mapyrus to generate layout in PDF pages containg maps, texts etc. It works excellent in most aspects. However, when we try to use a non default font (more specific 'TheSans'), we run in to some problems. With a 'newpage' command roughly like: newpage "pdf", "newpage.pdf", A4_X, A4_Y, "afmfiles=thesnb5_.afm pfbfiles=thesnb5_.pfb isolatinfonts=TheSans-B5Plain" it works fine when it comes to writing text with the label command. So far, so good. But we also use the 'pdf' command to display pdf files containing texts written with TheSans-style (these files are created in Adobe Illustrator and saved as PDF), and now there is a problem. the code goes something like this: pdf TextA.pdf, 1 . . pdf textB.pdf, 1 . . pdf TextC.pdf, 1 Now, the result is that the text in TextC.pdf is displayed correctly, but not the texts from TextA.pdf and TextB.pdf. Now, if we toss around the code a little and change the order of the 'pdf' commands like: pdf TextC.pdf, 1 . . pdf textA.pdf, 1 . . pdf TextB.pdf, 1 Then, it will be only the text in TextB.pdf that is displayed correctly. Furthermore, in the texts that are not displayed correctly, it seems like the only characters that indeed displayes correct, are the ones that are also present in the last pdf file. So, my layman conclusion is that the font definitions are read in with every pdf file, but gets written over or similiar when another pdf is read, so that in time for displaying, the only accessable font definition is the one from the last pdf. Could this be the case? Our temporary solution is that we created a pdf 'ascii.pdf' which contains more or less all ascii characters we use, and then read it in at the end of the code and place it somewhere outside the page view. This though, is not a satisfying solution in the long run, and I was hoping that someone could help me finding a more adequate way to solve it. Best regards Mattias Gustafsson |
|
From: Simon C. <sim...@ya...> - 2008-02-20 20:45:50
|
Hello Michaël,
> Hi,
>
> Mapyrus is a very nice library, with a clean design, and I'm glad to see
> the CVS is still active...
>
> [snip]
>
> - I saw a new feature allowing to add customized function in the CVS :
> any plan to release a new version ?
I released a new version (0.801) today with this change included.
Now you can do things like:
print java.lang.Integer.toHexString(32767)
let b = java.lang.Integer.parseInt("101110", 2)
let dummy = java.lang.Thread.sleep(1000)
print com.vividsolutions.jts.io.WKTWriter.stringOfChar("x", 12)
But you can only call static Java functions. You cannot
create Java objects and call methods on them.
>
> Thanks again for the excellent stuff
>
> Michaël
Regards,
Simon Chenery.
Mapyrus Developer
____________________________________________________________________________________
Be a better friend, newshound, and
know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ
|
|
From: Michaël M. <mic...@fr...> - 2008-02-19 22:04:50
|
Hi, Mapyrus is a very nice library, with a clean design, and I'm glad to see the CVS is still active... I wrote a small application accessing a postgreSQL database and doing some automatic mapping with mapyrus. I have a few questions about the best way to use it : - I have to access the same database table several times (to draw secondary roads, then primary roads, then secondary roads over a bridge, the primary roads over a bridge...). Is there a way to query the table, then to loop several times over the same dataset, or is the dataset released after the end of the first loop ? - I have to write street names (I use parallelpath and flowlabel), and I did not find an easy way to always write them over the road when the road is sometimes digitized from left to right and other times from right to left... (I get names over the road in the first case and under the road in the other case, and it is even more difficult to write them in the middle of the road) - I tried the svg output from a map with two levels of clipping (clipping on a general rectangular frame and clipping for features with stripepaths), but stripepaths are drawn out of their path (and out of the main frame in my case). Is this a known limitation of svg output - I saw a new feature allowing to add customized function in the CVS : any plan to release a new version ? Thanks again for the excellent stuff Michaël |
|
From: Simon C. <sim...@ya...> - 2007-06-28 21:15:03
|
Hello Luca,
> I have some problem with this layer, I draw it correctly (they are
> polygon) but when I had the clip "inside" (now) commented line nothing
> is drwan, nor the polygon nor the hatch
>
> do I make some error?
You are using the CLIP command in a loop when reading polygons.
This adds each polygon to the clip path.
Only the area inside _all_ clip paths will be displayed. This
is probably zero area and nothing is displayed.
You need to use a procedure so that the clip path is cleared
after each polygon.
I attempted to explain this in the documentation for the CLIP
command:
| If the path is clipped in a procedure, then the area remains
| clipped until the procedure is complete. Otherwise, the area
| remains permanently clipped for the page.
| When more than one path is clipped, drawing is limited to
| areas that satisfy all clip paths.
I have edited your example and attached it to this e-mail.
It should give you the output you want.
Regards,
Simon Chenery.
Mapyrus Developer
[lm.mapyrus]
____________________________________________________________________________________Ready for the edge of your seat?
Check out tonight's top picks on Yahoo! TV.
http://tv.yahoo.com/ |
|
From: luca m. <luc...@gm...> - 2007-06-28 09:28:32
|
Hi Simon, I have some problem with this layer, I draw it correctly (they are polygon) but when I had the clip "inside" (now) commented line nothing is drwan, nor the polygon nor the hatch do I make some error? thanks a lot luca dataset "shapefile", "../datirotati/edifici.shp", "dbffields=" while Mapyrus.fetch.more do fetch clearpath addpath GEOMETRY color '#A72B3E' linestyle 0.2 stroke # clip "inside" # stripepath 3, 60 # stroke done -- luca marletta www.beopen.it |
|
From: Simon C. <sim...@ya...> - 2007-06-21 20:53:26
|
Hello Luca, > on the contrary if I ask to read "vianome" string field I get thi error > > luca@amd64x2:~/GIS/mapyrus$ java -classpath mapyrus.jar > org.mapyrus.Mapyrus rete2.mapyrus > 407 > java.lang.ArrayIndexOutOfBoundsException: 407 > at org.mapyrus.dataset.ShapefileDataset.unpackString(Unknown Source) >From your example I see: $ /opt/shapelib/dbfdump -h -m rete_materiale.shp Field 0: Type=Integer, Title=`id', Width=16, Decimals=0 Field 1: Type=String, Title=`codut', Width=0, Decimals=0 Field 2: Type=Integer, Title=`n1', Width=16, Decimals=0 Field 3: Type=String, Title=`n1t', Width=33, Decimals=0 Mapyrus has an error reading the 'codut' fields which has zero width. I did not know zero width attribute fields are allowed! I have now fixed this problem and attributes from this file are read correctly I will release the next version of Mapyrus with this fix included on Sunday 24th June. Regards, Simon Chenery. Mapyrus Developer ____________________________________________________________________________________ Food fight? Enjoy some healthy debate in the Yahoo! Answers Food & Drink Q&A. http://answers.yahoo.com/dir/?link=list&sid=396545367 |
|
From: Simon C. <sim...@ya...> - 2007-06-20 06:14:30
|
Luca, > rotate -90 > label yw1, " lat" > rotate 90 > > Why it doesn't print a turned label ?? > the result is a normal horizontal label Add the command: font "Helvetica", 6 after the 'rotate -90' command. Then it works how you want. Labels use the rotation at the time the font was defined, not the rotation at the time labels are drawn. Regards, Simon Chenery. Mapyrus Developer ____________________________________________________________________________________ No need to miss a message. Get email on-the-go with Yahoo! Mail for Mobile. Get started. http://mobile.yahoo.com/mail |
|
From: luca m. <luc...@gm...> - 2007-06-17 17:25:24
|
Hi list,
I0m trying to use mapyrus with jdbc/postgresql/postgis
this my call in linux
java -classpath mapyrus.jar:postgresql-8.2-505.jdbc3.jar
org.mapyrus.Mapyrus rete.mapyrus
this the sql I use
let x1 = 1494071.0, y1 = 5058872.0, x2 = 1494911.0, y2 = 5059466.0
let sql = "SELECT AsText(the_geom) AS the_geom FROM newrete \
WHERE the_geom && GeometryFromText('BOX3D(" . x1 . " " . y1 . \
"," . x2 . " " . y2 . ")'::box3d::geometry,-1)"
but I always got the error below
ERROR: Invalid OGC WKT (does not start with P,L,M or G)
rete.mapyrus:69: 0: ERROR: Invalid OGC WKT (does not start with P,L,M
or G): XX000: SELECT AsText(the_geom) AS the_geom FROM newrete WHERE
the_geom && GeometryFromText('BOX3D(1494071 5058872,1494911
5059466)'::box3d::geometry,-1)
Could some one help on this point?
thanks a lot
luca
--
luca marletta
www.beopen.it
|
|
From: Simon C. <sim...@ya...> - 2007-06-12 20:40:43
|
Hello Luca,
> On Tue, 12 Jun 2007 "luca marletta" <luc...@gm...> wrote:
> [snip]
> By the way may I fetch geometry from postgis or just from postgresql
> as text geometry?
>
> Thanks a lot for your support
>
> luca
Mapyrus can read from a relational database using the Java JDBC interface.
This includes reading OGC geometry types (in well-known text 'WKT' or well-
known binary 'WKB' format).
That means that Mapyrus can read geometry data types from a PostGIS database.
Section '4.11 Displaying Data Stored In A Database' contains some examples
of reading geometry data from a database.
Regards,
Simon Chenery.
Mapyrus Developer
____________________________________________________________________________________
Be a better Globetrotter. Get better travel answers from someone who knows. Yahoo! Answers - Check it out.
http://answers.yahoo.com/dir/?link=list&sid=396545469
|
|
From: luca m. <luc...@gm...> - 2007-06-12 06:55:25
|
On 6/12/07, luca marletta <luc...@gm...> wrote: > Thanks Simon for your reply, I'm working just now on it and my doubt > is about MULTIPOINT shape > I guess mapyrus doesn't manage them and that cold be the problem. > > I did shapes with openjump and even if they are single points the > shape format is multi. > > Do you confirm it could be the problem? I try to build another POINT > shape for test now > > By the way may I fetch geometry from postgis or just from postgresql > as text geometry? > > Thanks a lot for your support > > luca Yes, I solved. Problems was that OpenJump save Point shape as multipoint even if single and mapyrus doesn't read them. In my opinion could be very useful the possibility to read from postgis geometry because is becoming a standard for manage geometry on db. luca -- luca marletta www.beopen.it |
|
From: luca m. <luc...@gm...> - 2007-06-12 06:40:33
|
Thanks Simon for your reply, I'm working just now on it and my doubt is about MULTIPOINT shape I guess mapyrus doesn't manage them and that cold be the problem. I did shapes with openjump and even if they are single points the shape format is multi. Do you confirm it could be the problem? I try to build another POINT shape for test now By the way may I fetch geometry from postgis or just from postgresql as text geometry? Thanks a lot for your support luca On 6/12/07, Simon Chenery <sim...@ya...> wrote: > Hi Luca, > > > I just get the white canvas and never seen any point and not even any > > debug info appears. > > Your example commands look OK. Maybe there is something unusual with your > ESRI Shape file? > > I have attached the example 'example2.mapyrus' that *does* work > with the file hotel.shp included with Mapyrus. The PNG output > file 'a.png' is also attached. > > Regards, > > Simon Chenery. > Mapyrus Developer > > > > ____________________________________________________________________________________ > Need a vacation? Get great deals > to amazing places on Yahoo! Travel. > http://travel.yahoo.com/ > begin hotel name > color "blue" > font "Arial", 4 > circle 0, 0, 2 > stroke > clearpath > move 3, 0 > label name > end > > newpage "png", "a.png", 100, 100, "background=white" > > dataset "shapefile", "hotel.shp", "" > worlds Mapyrus.dataset.min.x, Mapyrus.dataset.min.y, Mapyrus.dataset.max.x, Mapyrus.dataset.max.y > > while Mapyrus.fetch.more > do > fetch > clearpath > addpath GEOMETRY > hotel HOTELNAME > done > > > > -- luca marletta www.beopen.it |
|
From: Simon C. <sim...@ya...> - 2007-06-12 06:15:46
|
Hi Luca,
> I just get the white canvas and never seen any point and not even any
> debug info appears.
Your example commands look OK. Maybe there is something unusual with your
ESRI Shape file?
I have attached the example 'example2.mapyrus' that *does* work
with the file hotel.shp included with Mapyrus. The PNG output
file 'a.png' is also attached.
Regards,
Simon Chenery.
Mapyrus Developer
____________________________________________________________________________________
Need a vacation? Get great deals
to amazing places on Yahoo! Travel.
http://travel.yahoo.com/ |
|
From: luca m. <luc...@gm...> - 2007-06-11 13:26:38
|
HI List, I did several trial with simple test per drawing points from a points shape I just get the white canvas and never seen any point and not even any debug info appears. I'm sure I'm doing a real silly error but you could save me a lot of hours if someone could help with a little hint. Thanks in advance luca ---------------------------------- newpage "svg", "test.svg", 200, 200, "background=white" begin idnodo name circle 0, 0, 2 color "red" stroke clearpath move 3, 0 font "Dialog", 4 label name end # Read each city from text file and draw symbol at it latitude/longitude position. color "orange" linestyle 10 dataset "shapefile", "test.shp", "dbffields=" worlds Mapyrus.dataset.min.x, Mapyrus.dataset.min.y, \ Mapyrus.dataset.max.x, Mapyrus.dataset.max.y clearpath while Mapyrus.fetch.more do clearpath fetch addpath GEOMETRY print "DEBUG:", GEOMETRY, ID stroke idnodo ID done ---------------------------------- -- luca marletta www.beopen.it |
|
From: Simon C. <sim...@ya...> - 2007-06-10 22:14:11
|
Hello Luca,
> Hi Simon,
> I really like a lot your mapyrus, really great piece of software.
>
> I discovered just today and I'm started immediately to find out all the
> tricks with some great reasults for quality that make me go on.
>
> I cannot find a way to design a simple circle on a point shape geometry.
I have attached example Mapyrus commands in file 'example1.mapyrus'
and a text file 'cities.txt' that point geometry is read from.
I also attached the output file 'a.png' -- maybe this is what you want?
> There is a tutorial for language to use?
The file mapyrus.pdf contains examples for many types of output, for
other types you have to experiment yourself to get the output you want.
> In my opinion it would be very useful a sort of simple way to add border
> with detail for professional printing in ISO map for instance "A0 A1 .."
You can use the WORLDS command to draw to your map in only part of the page.
Then you can use the rest of the page for scalebars, titles, logos, etc.
See section 4.31 Page Layout in mapyrus.pdf for an example.
>
> What your plan for future development of mapyrus
Mapyrus already works well and I have no good ideas for further changes.
So I have not done much development recently.
If you have any good ideas for improvements then let me know -- maybe I can
add them.
> Thanks a lot
>
> luca
Cheers,
Simon Chenery.
Mapyrus Developer
____________________________________________________________________________________
Pinpoint customers who are looking for what you sell.
http://searchmarketing.yahoo.com/ |
|
From: Simon C. <sim...@ya...> - 2007-05-10 22:03:05
|
Alex, > Hi,Simon would you please show me a hand about what was wrong within > following mapyrus script. > I cannot make the procedure work well. When I run this script there is no error. Mapyrus runs to the end and creates a PNG image. I have attached the PNG output file (77240559274819587-original.png) I get to this e-mail. The output does not look very nice. I tried to understand what you may be trying to do and changed the script file 76946219214962690.mapyrus. I have attached the new version of this file, and the new PNG output file (77240559274819587-new.png) to this e-mail. Cheers, Simon Chenery. Mapyrus Developer ____________________________________________________________________________________ Get your own web address. Have a HUGE year through Yahoo! Small Business. http://smallbusiness.yahoo.com/domains/?p=BESTDEAL |
|
From: Alex C. <che...@gm...> - 2007-05-09 01:55:23
|
Please show me a hand about what was wrong within following mapyrus script. Main mapyrus script(77240559274819587.mapyrus): include E:\test\mapyrus\76946219214962690.mapyrus newpage "png", "E:\\test\\mapyrus\\77240559274819587.png", 100, 100 let p1=1 let p2=2 let p3=3 let p4=4 let p5=5 clearpath move 22, 15 zhengfangxing p1,p2,p3,p4,p5 Procedure mapyrus script(76946219214962690.mapyrus): #generate a test image begin zhengfangxing p1,p2,p3,p4,p5 color "blue" box 5, 5, 25, 25 fill closepath color "yellow" linestyle 4 move 5, 20 draw 20, 20, 5, 5, 20, 5 stroke end |
|
From: Simon C. <sim...@ya...> - 2006-12-06 11:51:36
|
Hello Emery,
| [snip]
| I have been attempting to get away from Esri for a long time. I have
| been testing apps such as MySQL and Linux but was always not satisfied
| for some reason or another with the opensource backend graphics engines.
| Your's works great.
If you have any ideas for improvements to Mapyrus then let me
know -- it is hard work trying to have all the good ideas myself!
| I do have a issue that is probably a user error on my part. I can not
| get an rgb fill to work when all 3 values are not zero. Please see the
| example below. Thanks Emery
|
| newpage "pdf", "testPDFres.pdf", 215.9, 279.4, "resolution=200"
| font "Courier", 8
|
| clearpath
| move 100, 100
| color "black"
| linestyle 1
| box 90,90,110,110
| stroke
| color "rgb",212,210,252 #ng when all three values not 0
^^^^^^^^^^^
You need to give the red, green and blue values in the range 0 to 1.
That is:
color "rgb", 0.83, 0.82, 0.99
Some other ways that will also work are:
color "rgb", 212 / 255, 210 / 255, 252 / 255
color "#D4D2FC"
Cheers,
Simon Chenery.
Mapyrus Developer
____________________________________________________________________________________
Have a burning question?
Go to www.Answers.yahoo.com and get answers from real people who know.
|
|
From: Simon C. <sim...@ya...> - 2006-11-02 12:07:16
|
Hello Mike, > Simon, > > I believe your explanation describes my situation perfectly. If I > understand correctly, you are saying that the outer polygon currently > INCLUDES the area of the inner one, thereby blocking the inner one from > being detected if the AREA for the outer one occurs first. But it is > possible to define the outer polygon such that it does NOT include the area > possible to define the outer polygon such that it does NOT include the area > of the inner one, i.e. so that the outer one has a hole. Then a separate I have just released Mapyrus version 0.612 which creates HTML imagemaps correctly for polygons with holes. The source code changes you sent me yesterday are also included in this new release. Cheers, Simon Chenery. Mapyrus Developer ____________________________________________________________________________________ Low, Low, Low Rates! Check out Yahoo! Messenger's cheap PC-to-Phone call rates (http://voice.yahoo.com) |
|
From: Simon C. <sim...@ya...> - 2006-11-01 10:56:10
|
Hello Mike, | Hi, Simon, | | I seem to be having a problem with the Mapyrus-generated imagemap. It | works fine except in the case where a polygon completely surrounds | another one. In this case, the "inner" polygon is not recognized when | mousing over it in the browser. I have observed several instances of | this, and they all behave consistently. I've noticed that in every | case, the <AREA> entry for the "surrounding" polygon appears before the | one for the "surrounded" one in the imagemap. | | In a way, this seems like logical behavior. If the browser determines | that the mouse pointer is positioned within a specified AREA, why should | it check further? If it did, and found multiple AREAS enclosing the | pointer location, it would have to determine which one is smaller. I | don't know if it's that smart or not. In any case, I checked the W3C | HTML spec, and it specifically says that the first matching AREA tag | takes precedence. From this, it would appear that Mapyrus should | generate the entry for the inner polygon first. I have manually edited | the imagemap into this sequence, and it works fine. | | However, there is another puzzling fact. My coworker has developed an | alternate version of the map page using GeoTools. In the imagemap that | GeoTools generates from the exact same shapefile, the AREA for the outer | polygon ALSO occurs before the one for the inner polygon, yet the | mouseover detects the inner polygon properly! | | I have one other observation that may be relevant. Mapyrus seems to | generate more than one <AREA> entry for the outer polygon. I don't Mapyrus currently generates more than one <AREA> entry for a polygon with "holes" or "islands". One <AREA> entry is generated for the polygon perimeter and one <AREA> entry is generated for each hole. This means that an <AREA> entry for a later polygon inside a polygon hole will never match because the <AREA> entry for the perimeter of the first polygon always matches first. I have now fixed this so that a polygon with holes only generates one <AREA> entry with the perimeter and all holes together. Later polygons inside the holes can now be matched. I have attached files demonstrating this: 1. an HTML file with imagemaps created with and without my changes. 2. the Mapyrus commands (expr.txt) that created these imagemaps. Is this your problem? If it is, then I can release a new version of Mapyrus containing these changes. Thanks for bringing this to my attention, Simon Chenery. Mapyrus Developer ____________________________________________________________________________________ Get your email and see which of your friends are online - Right on the New Yahoo.com (http://www.yahoo.com/preview) |
|
From: <ni...@em...> - 2006-10-20 21:45:05
|
Hi Simon, > [Simon Chenery, 2006-10-20T12:35:40-07:00] > You have set no font so a default font is used. [...] > Define a font in Mapyrus using the FONT command before you use the LABEL Thank you for the quick reply. I have tried defining a default font, but it doesn't work, or better, it doesn't work if I write directly the accented characters in the script, while writing them as escape sequences (as in tutoriallabels1.mapyrus) all is fine. I think of using this workaround on that machine. :) Thanks again for the help. Ciao. -- Nicola Vitale ni...@em... |
|
From: Simon C. <sim...@ya...> - 2006-10-20 19:35:52
|
Hello Nicola, You have set no font so a default font is used. When you use Linux, I think your default font has no accented characters. Define a font in Mapyrus using the FONT command before you use the LABEL command. Then you should have a font with accented characters available. Some example FONT commands are: font "Dialog", 4 font "monospaced", 4 font "serif", 4 font "Helvetica-Italic", 4 Cheers, Simon Chenery. Mapyrus Developer __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com |
|
From: <ni...@em...> - 2006-10-20 15:08:45
|
Hello,
I have a problem with the accented characters creating PNG images.
If I run mapyrus for example with this script:
### begin script
let b =3D 10
let c =3D 70
let output_file =3D "vocali_accentate.png"
let vocali_accentate =3D "Vocali accentate: =E8=E9=E0=F2=F9"
newpage "png", output_file, c, b, "background=3Dwhite"
move 3, 3
label vocali_accentate
endpage
### end script
on my FreeBSD system, I get the correct image:
http://img294.imageshack.us/img294/1882/vocaliaccentatefreebsdxa8.png
But the same script produces a different image on a Linux system:
http://img218.imageshack.us/img218/4493/vocaliaccentatelinuxkc5.png
Why? Missing font? How can I solve?
Thank you very much.
Note
----
1) Mapyrus version on FreeBSD:
Mapyrus 0.610 19-September-2006
Java version 1.5.0 (Sun Microsystems Inc.) in /usr/local/diablo-jdk1.5=
.0/jre
2) Mapyrus version on Linux (no X-Windows system installed):
Mapyrus 0.610 19-September-2006
Java version 1.5.0_09 (Sun Microsystems Inc.) in /home/users/stan/soft=
ware/jre1.5.0_09
Ciao.
--
Nicola Vitale
ni...@em...
|