Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8918617
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T05:48:10+00:00 2026-06-15T05:48:10+00:00

I am trying to read from a Web Map Server w/out using the mapping

  • 0

I am trying to read from a Web Map Server w/out using the mapping toolbox (more specifically, w/out using the WebMapServer object). I can construct the URL myself w/out problem and can just use imread for WMSs that return bmp files. However, one of the WMSs returns BIL files (Band InterLeaved) and imread() does not recognize it.

How can I read a BIL file from a URL w/out using the mapping toolbox?

Edit: Here is an example URL that I’d like to read:

http://www.nasa.network.com/elev?SERVICE=WMS&LAYERS=mergedAsterElevations&EXCEPTIONS=application/vnd.ogc.se_xml&FORMAT=image%2Fbil&TRANSPARENT=FALSE&HEIGHT=1113&BGCOLOR=0xFFFFFF&REQUEST=GetMap&WIDTH=925&BBOX=-118.545692,33.960524,-118.44569200000001,34.060523999999994&STYLES=&SRS=EPSG:4326&VERSION=1.3.0

Also, if I try to just grab the byte data w/ urlread and then write it to file, somehow some of the values are lost.

bytedata = urlread( mapurl );
fp = fopen( 'tmp.bil', 'w' );
fwrite( fp, bytedata, 'uint8' );
fclose( fp );
fp = fopen( 'tmp.bil', 'r' );
z = fread( fp, 'int16' );
imagesc( reshape( z, 925, 1113 )' );

The above displays an image similar to that returned by the mapping toolbox but there are regions that are set to a constant value that should not be.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T05:48:11+00:00Added an answer on June 15, 2026 at 5:48 am

    The solution to the above problem is to use urlwrite() rather than urlread(), since the latter will not properly handle binary data.

    fname = tempname();
    urlwrite(mapurl,fname);
    fp = fopen(fname,'r');
    map = reshape(fread(fp,'int16=>int16'),Ncols,Nrows)';
    fclose(fp);
    delete(fname);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to read values from System.Web.Helpers.DynamicJsonObject. I can see the values in the
I am trying to connect to the SQL Server from Visual Web Developer using
I am trying to read data from the given web page using Java. public
I am trying to read some data from a python module from a web.
I am trying to read from a file and encrypt the data using AES
I am trying to read from a file on the local machine using Ajax.The
I am using Delphi and trying to read from a bar code scanner over
Hi I am trying to read an xml file from outside the web-app container,
I'm trying to read all bytes from a web site but I think I
I am trying to read the streaming from a Network IP Camera. I can

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.