DATARANGE serialization type invalid [MAPSCRIPT] #4992

Closed
geonux opened this Issue Sep 11, 2014 · 1 comment

Comments

Projects
None yet
2 participants
@geonux
Contributor

geonux commented Sep 11, 2014

I have detected a serialization problem with the DATARANGE fields when using the Mapscript methods mapfile.convertToString () and mapfile.save () causing information loss. Indeed, the DATARANGE (type double) are serialized as integer.

This seems to happen in the file mapfile.c :
In the writeStyle function, the DATARANGE is serialized with the writeDimension function which use msIO_fprintf(stream, "%s %d ", name, x); (note : remark the %d).
Another write* function must be created to handle a couple of double values.

For ex. (not tested yet):

static void writeDataRange(FILE *stream, int indent, const char *name, double x, double y)
{
  writeIndent(stream, ++indent);
  msIO_fprintf(stream, "%s %f.4 %f.4\n", name, x, y);
}

@geonux geonux changed the title from DATARANGE serialization type invalid to DATARANGE serialization type invalid [MAPSCRIPT] Dec 19, 2014

sdlime added a commit that referenced this issue Dec 22, 2014

Merge pull request #5055 from geonux/issue_4992
Correct issue #4992 : DATARANGE serialization type invalid
@jratike80

This comment has been minimized.

Show comment
Hide comment
@jratike80

jratike80 Nov 9, 2015

Correct me and reopen the ticket if I am wrong, but if the patch is merged and comment says that it corrects issue #4992, isn't this issue fixed then?

Correct me and reopen the ticket if I am wrong, but if the patch is merged and comment says that it corrects issue #4992, isn't this issue fixed then?

@jratike80 jratike80 closed this Nov 9, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment