ESRI ASCII raster format

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
15 messages Options
Reply | Threaded
Open this post in threaded view
|

ESRI ASCII raster format

SergeStinckwich
Dear all,

I'm looking for an implementation of ESRI ASCII raster format:

We are looking for such an implementation for CORMAS:

Thank you.
Regards,
--
Reply | Threaded
Open this post in threaded view
|

Re: ESRI ASCII raster format

Stéphane Ducasse
Thanks for mentioning it. 
It can be a super nice exercise. 
with a line based constructor. 
It can be super fun to code for a book chapter. 
For when do you need it?

S. 

On 3 Jun 2020, at 04:01, Serge Stinckwich <[hidden email]> wrote:

Dear all,

I'm looking for an implementation of ESRI ASCII raster format:

We are looking for such an implementation for CORMAS:

Thank you.
Regards,
--

--------------------------------------------
Stéphane Ducasse
03 59 35 87 52
Assistant: Aurore Dalle 
FAX 03 59 57 78 50
TEL 03 59 35 86 16
S. Ducasse - Inria
40, avenue Halley, 
Parc Scientifique de la Haute Borne, Bât.A, Park Plaza
Villeneuve d'Ascq 59650
France

Reply | Threaded
Open this post in threaded view
|

Re: ESRI ASCII raster format

SergeStinckwich


On Wed, Jun 3, 2020 at 3:27 PM Stéphane Ducasse <[hidden email]> wrote:
Thanks for mentioning it. 
It can be a super nice exercise. 
with a line based constructor. 
It can be super fun to code for a book chapter. 

Yes I think so. This is not super complicated from what I see in the format description.

For when do you need it?


ASAP, but we can wait :-)
This is part of our work on the migration of CORMAS from VW to Pharo: https://github.com/cormas/cormas
At the moment, the code to support this format is entangled in the grid model ...

We can even do a pair programming session with you and other CORMERS.
We are doing weekly meeting on Discord.

Thank you.

Regards,

--
Reply | Threaded
Open this post in threaded view
|

Re: ESRI ASCII raster format

Stéphane Ducasse
Ok I’m a paper on the grill and I will give a try to see if I can do it in TDD in 1 or 1:30 as a kata.
I will let you know but by the end of the week you have it. 


On 3 Jun 2020, at 09:33, Serge Stinckwich <[hidden email]> wrote:



On Wed, Jun 3, 2020 at 3:27 PM Stéphane Ducasse <[hidden email]> wrote:
Thanks for mentioning it. 
It can be a super nice exercise. 
with a line based constructor. 
It can be super fun to code for a book chapter. 

Yes I think so. This is not super complicated from what I see in the format description.

For when do you need it?


ASAP, but we can wait :-)
This is part of our work on the migration of CORMAS from VW to Pharo: https://github.com/cormas/cormas
At the moment, the code to support this format is entangled in the grid model ...

We can even do a pair programming session with you and other CORMERS.
We are doing weekly meeting on Discord.

Thank you.

Regards,

--

--------------------------------------------
Stéphane Ducasse
03 59 35 87 52
Assistant: Aurore Dalle 
FAX 03 59 57 78 50
TEL 03 59 35 86 16
S. Ducasse - Inria
40, avenue Halley, 
Parc Scientifique de la Haute Borne, Bât.A, Park Plaza
Villeneuve d'Ascq 59650
France

Reply | Threaded
Open this post in threaded view
|

Re: ESRI ASCII raster format

SergeStinckwich


On Wed, Jun 3, 2020 at 3:40 PM Stéphane Ducasse <[hidden email]> wrote:
Ok I’m a paper on the grill and I will give a try to see if I can do it in TDD in 1 or 1:30 as a kata.
I will let you know but by the end of the week you have it. 


Our meeting is every Friday at 11:30am (France time), 9:30am UTC time.

Regards,
--
Reply | Threaded
Open this post in threaded view
|

Re: ESRI ASCII raster format

cedreek
I’ll try to join. 

The file seem indeed easy to process.


Except the implication by the or (xllcenter or xllcorner).

Cheers,
Cédrick



Le 3 juin 2020 à 09:44, Serge Stinckwich <[hidden email]> a écrit :



On Wed, Jun 3, 2020 at 3:40 PM Stéphane Ducasse <[hidden email]> wrote:
Ok I’m a paper on the grill and I will give a try to see if I can do it in TDD in 1 or 1:30 as a kata.
I will let you know but by the end of the week you have it. 


Our meeting is every Friday at 11:30am (France time), 9:30am UTC time.

Regards,
--

Reply | Threaded
Open this post in threaded view
|

Re: ESRI ASCII raster format

Richard O'Keefe
In reply to this post by SergeStinckwich
Reading and writing the format looks pretty straightforward;
the question is, what is the internal representation?
These things are basically decorated 2D number arrays.
It is said in various places that the cell entries are
stored as integers, but not what precision, nor what mapping
there might be between internal and external numbers.


On Wed, 3 Jun 2020 at 14:02, Serge Stinckwich <[hidden email]> wrote:
Dear all,

I'm looking for an implementation of ESRI ASCII raster format:

We are looking for such an implementation for CORMAS:

Thank you.
Regards,
--
Reply | Threaded
Open this post in threaded view
|

Re: ESRI ASCII raster format

Stéphane Ducasse
In reply to this post by cedreek
I did it as a kata as fast as I could …


I found the spec a bit strange

The header information is followed by cell value information specified in space-delimited row-major order, with each row separated by a carriage return.
and 
  • No carriage returns are necessary at the end of each row in the raster. The number of columns in the header determines when a new row begins.
O_o

so I followed the example on wikipedia

It was fun. 
My implementation could be more robust but for 2 hours coding.
It was a fun kata. 

S. 




On 3 Jun 2020, at 11:24, Cédrick Béler <[hidden email]> wrote:

I’ll try to join. 

The file seem indeed easy to process.

<GraphiqueCollé-3.png>

Except the implication by the or (xllcenter or xllcorner).

Cheers,
Cédrick



Le 3 juin 2020 à 09:44, Serge Stinckwich <[hidden email]> a écrit :



On Wed, Jun 3, 2020 at 3:40 PM Stéphane Ducasse <[hidden email]> wrote:
Ok I’m a paper on the grill and I will give a try to see if I can do it in TDD in 1 or 1:30 as a kata.
I will let you know but by the end of the week you have it. 


Our meeting is every Friday at 11:30am (France time), 9:30am UTC time.

Regards,
--


--------------------------------------------
Stéphane Ducasse
03 59 35 87 52
Assistant: Aurore Dalle 
FAX 03 59 57 78 50
TEL 03 59 35 86 16
S. Ducasse - Inria
40, avenue Halley, 
Parc Scientifique de la Haute Borne, Bât.A, Park Plaza
Villeneuve d'Ascq 59650
France

Reply | Threaded
Open this post in threaded view
|

Re: ESRI ASCII raster format

hernanmd
I think we could also use the GeoJSON package?
I did a little example with the package from the zweidenker repository

Metacello new
    baseline: 'GeoJSON';
    repository: 'github://zweidenker/GeoJSON';
    load.

and use it like this:
| url file |
url := 'https://github.com/mgaitan/departamentos_argentina/raw/master/departamentos-argentina.json'.
ZnClient new
	systemPolicy;
	url: url;
	numberOfRetries: 2;
	maximumEntitySize: 1024 * 1024 * 1024;
	signalProgress: true;
	contentReader: [ : entity | GeoJSONReader fromString: entity contents ];
	get.

And the coordinates can be obtained using:

self features anyOne geometry coordinates

But is this useful for CORMAS?

Cheers,

Hernán

El mié., 3 jun. 2020 a las 18:16, Stéphane Ducasse (<[hidden email]>) escribió:
I did it as a kata as fast as I could …


I found the spec a bit strange

The header information is followed by cell value information specified in space-delimited row-major order, with each row separated by a carriage return.
and 
  • No carriage returns are necessary at the end of each row in the raster. The number of columns in the header determines when a new row begins.
O_o

so I followed the example on wikipedia

It was fun. 
My implementation could be more robust but for 2 hours coding.
It was a fun kata. 

S. 




On 3 Jun 2020, at 11:24, Cédrick Béler <[hidden email]> wrote:

I’ll try to join. 

The file seem indeed easy to process.

<GraphiqueCollé-3.png>

Except the implication by the or (xllcenter or xllcorner).

Cheers,
Cédrick



Le 3 juin 2020 à 09:44, Serge Stinckwich <[hidden email]> a écrit :



On Wed, Jun 3, 2020 at 3:40 PM Stéphane Ducasse <[hidden email]> wrote:
Ok I’m a paper on the grill and I will give a try to see if I can do it in TDD in 1 or 1:30 as a kata.
I will let you know but by the end of the week you have it. 


Our meeting is every Friday at 11:30am (France time), 9:30am UTC time.

Regards,
--


--------------------------------------------
Stéphane Ducasse
03 59 35 87 52
Assistant: Aurore Dalle 
FAX 03 59 57 78 50
TEL 03 59 35 86 16
S. Ducasse - Inria
40, avenue Halley, 
Parc Scientifique de la Haute Borne, Bât.A, Park Plaza
Villeneuve d'Ascq 59650
France

Reply | Threaded
Open this post in threaded view
|

Re: ESRI ASCII raster format

SergeStinckwich
In reply to this post by Stéphane Ducasse


On Thu, Jun 4, 2020 at 5:16 AM Stéphane Ducasse <[hidden email]> wrote:
I did it as a kata as fast as I could …


I found the spec a bit strange

yes this is a very old format ...

The header information is followed by cell value information specified in space-delimited row-major order, with each row separated by a carriage return.
and 
  • No carriage returns are necessary at the end of each row in the raster. The number of columns in the header determines when a new row begins.
O_o

so I followed the example on wikipedia

It was fun. 
My implementation could be more robust but for 2 hours coding.
It was a fun kata. 

Would you want to share your work during our next CORMAS meeting, Friday?

Regards,
--
Reply | Threaded
Open this post in threaded view
|

Re: ESRI ASCII raster format

Stéphane Ducasse

It was fun. 
My implementation could be more robust but for 2 hours coding.
It was a fun kata. 

Would you want to share your work during our next CORMAS meeting, Friday?


If you want now cormas can use it, fork it, expand,….
I did it for you as an exercise for me. 

S. 
Reply | Threaded
Open this post in threaded view
|

Re: ESRI ASCII raster format

SergeStinckwich


On Thu, Jun 4, 2020 at 4:08 PM Stéphane Ducasse <[hidden email]> wrote:

It was fun. 
My implementation could be more robust but for 2 hours coding.
It was a fun kata. 

Would you want to share your work during our next CORMAS meeting, Friday?


If you want now cormas can use it, fork it, expand,….
I did it for you as an exercise for me. 


Ok, this is great. We will definitively reused it for CORMAS.
Regards

--
Reply | Threaded
Open this post in threaded view
|

Re: ESRI ASCII raster format

Richard O'Keefe
In reply to this post by Richard O'Keefe
Does anyone know of a collection of test files for this format?

On Thu, 4 Jun 2020 at 01:39, Richard O'Keefe <[hidden email]> wrote:
Reading and writing the format looks pretty straightforward;
the question is, what is the internal representation?
These things are basically decorated 2D number arrays.
It is said in various places that the cell entries are
stored as integers, but not what precision, nor what mapping
there might be between internal and external numbers.


On Wed, 3 Jun 2020 at 14:02, Serge Stinckwich <[hidden email]> wrote:
Dear all,

I'm looking for an implementation of ESRI ASCII raster format:

We are looking for such an implementation for CORMAS:

Thank you.
Regards,
--
Reply | Threaded
Open this post in threaded view
|

Re: ESRI ASCII raster format

Ben Coman
Minimal...
 

On Thu, 4 Jun 2020 at 21:00, Richard O'Keefe <[hidden email]> wrote:
Does anyone know of a collection of test files for this format?

You might be looking for smaller tests, but anyway..


Reply | Threaded
Open this post in threaded view
|

Re: ESRI ASCII raster format

Ben Coman
A couple of other interesting things I bumped into...



On Fri, 5 Jun 2020 at 01:33, Ben Coman <[hidden email]> wrote:
On Thu, 4 Jun 2020 at 21:00, Richard O'Keefe <[hidden email]> wrote: