Unfortunately SourceForge dropps the E-Mail support for all project websites on June 26, 2017 (which includes this forum).

E-Mail is required for registration, password-reset and notifications - therefore after this date the creation of new accounts will no longer be possible.

USGS Topo Map source file

For discussions, questions and problems that arise when developing new map sources for MOBAC
Kedmun
Posts: 1
Joined: 20 Jan 2017, 08:42

USGS Topo Map source file

Postby Kedmun » 20 Jan 2017, 08:49

Hey guys,

Sorry if this has come up before, I had a search and can't see anything specific about it.

I've got the latest version of MOBAC, and none of the USGS sources seem to be working for me. The tiles are just coming up with big red X's...

I've tried to add a custom source from ArcGIS, and I've got 1 giant world tile...but nothing more than that...

<?xml version="1.0" encoding="UTF-8"?>
<customMapSource>
<name>USGS National Map - Topo</name>
<minZoom>8</minZoom>
<maxZoom>15</maxZoom>
<tileType>png</tileType>
<tileUpdate>IfNoneMatch</tileUpdate>
<url>http://basemap.nationalmap.gov/ArcGIS/rest/services/USGSTopo/MapServer/tile/{$z}/{$x}/{$y}.png</url>
<backgroundColor>#000000</backgroundColor>
</customMapSource>

If someone could help with a custom source file I'd be extremely grateful!
Cheers,
Keith

r_x
Site Admin
Posts: 670
Joined: 25 Jun 2011, 14:00

Re: USGS Topo Map source file

Postby r_x » 20 Jan 2017, 11:35

USGS has changed their maps a bit. Most maps are now only available via SSL/TLS, therefore just changing http:// to https:// makes them work again.

However some maps have disappeared, like the "TNM_Vector_Fills_Small". I could need some help in investigating what happened to those maps.
Please read the MOBAC FAQ and MOBAC README before posting.

dr_quark
Posts: 2
Joined: 06 Apr 2017, 15:27

Re: USGS Topo Map source file

Postby dr_quark » 06 Apr 2017, 15:50

Never done Java. So I installed Java-Editor and tried to open the file "mp-region_america_north.jar", but all I see in the editor is "Java call: ...". Just one line. How do I get to the code that I see in Kedmum's post above?

r_x
Site Admin
Posts: 670
Joined: 25 Jun 2011, 14:00

Re: USGS Topo Map source file

Postby r_x » 06 Apr 2017, 15:57

The post shows a custom XML map source. This is a MOBAC specific format:
http://mobac.sourceforge.net/MOBAC/READ ... mMapSource
Please read the MOBAC FAQ and MOBAC README before posting.

ndoggac
Posts: 15
Joined: 26 Jul 2014, 13:56

Re: USGS Topo Map source file

Postby ndoggac » 01 May 2017, 22:06

Going a little bonkers here....this is all the topo I got.

1. save to xml file

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
<customMapSource>
    <name>USGS 1950s Topo</name>
    <minZoom>10</minZoom>
    <maxZoom>17</maxZoom>
    <tileType>PNG</tileType>
    <tileUpdate>None</tileUpdate>
    <url><![CDATA[http://tileserver.trimbleoutdoors.com/SecureTile/TileHandler.ashx?mapType=Topo&partnerID=839&hash=4B9383F91BC8FA15F46A137FC50F7037&x={$x}&y={$y}&z={$z}]]></url>
</customMapSource>


2. save to bsh file

Code: Select all

name = "USA ArcGis";
String getTileUrl( int zoom, int x, int y ) {
return "http://services.arcgisonline.com/ArcGIS/rest/services/USA_Topo_Maps/MapServer/tile/"+ zoom + "/" + y + "/"+ x + ".png";
}
tileType = "png";


3. save to bsh file

Code: Select all

name = "Topo.ArcGis";
minZoom = 0;
maxZoom = 17;
String getTileUrl( int zoom, int x, int y ) {
return "http://services.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer/tile/"+ zoom + "/" + y + "/"+ x + ".png";
}
tileType = "png";


4. save to bsh file

Code: Select all

name = "USA Caltopo";
tileType = "png";
minZoom = 6;   
maxZoom = 16;   
   

String getTileUrl( int zoom, int x, int y )
{ return "http://s3-us-west-1.amazonaws.com/caltopo/topo/"+zoom+"/"+x+"/"+y+".png";
}
void addHeaders( java.net.HttpURLConnection conn) {
  conn.addRequestProperty("Referer","caltopo.com");
  conn.addRequestProperty("User-Agent","Mozilla/5.0 (Windows NT 6.1; rv:7.0.1) Gecko/20100101 Firefox/24.0");
}


Return to “Map Source Development (English)”



Who is online

Users browsing this forum: No registered users and 1 guest