Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DATARANGE serialization type invalid [MAPSCRIPT] #4992

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

DATARANGE serialization type invalid [MAPSCRIPT] #4992

geonux opened this issue Sep 11, 2014 · 1 comment

Comments

@geonux
Copy link
Contributor

@geonux 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 DATARANGE serialization type invalid DATARANGE serialization type invalid [MAPSCRIPT] Dec 19, 2014
sdlime added a commit that referenced this issue Dec 22, 2014
Correct issue #4992 : DATARANGE serialization type invalid
@jratike80
Copy link

@jratike80 jratike80 commented 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?

@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
Labels
None yet
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants