{"action":"created","issue":{"url":"https://api.github.com/repos/DotSpatial/DotSpatial/issues/475","repository_url":"https://api.github.com/repos/DotSpatial/DotSpatial","labels_url":"https://api.github.com/repos/DotSpatial/DotSpatial/issues/475/labels{/name}","comments_url":"https://api.github.com/repos/DotSpatial/DotSpatial/issues/475/comments","events_url":"https://api.github.com/repos/DotSpatial/DotSpatial/issues/475/events","html_url":"https://github.com/DotSpatial/DotSpatial/issues/475","id":153415850,"number":475,"title":"WKBWriter adds 4 null bytes?","user":{"login":"mogikanin","id":840681,"avatar_url":"https://avatars.githubusercontent.com/u/840681?v=3","gravatar_id":"","url":"https://api.github.com/users/mogikanin","html_url":"https://github.com/mogikanin","followers_url":"https://api.github.com/users/mogikanin/followers","following_url":"https://api.github.com/users/mogikanin/following{/other_user}","gists_url":"https://api.github.com/users/mogikanin/gists{/gist_id}","starred_url":"https://api.github.com/users/mogikanin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mogikanin/subscriptions","organizations_url":"https://api.github.com/users/mogikanin/orgs","repos_url":"https://api.github.com/users/mogikanin/repos","events_url":"https://api.github.com/users/mogikanin/events{/privacy}","received_events_url":"https://api.github.com/users/mogikanin/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/DotSpatial/DotSpatial/labels/bug","name":"bug","color":"ee0701"},{"url":"https://api.github.com/repos/DotSpatial/DotSpatial/labels/CodePlex","name":"CodePlex","color":"ededed"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/DotSpatial/DotSpatial/milestones/1","html_url":"https://github.com/DotSpatial/DotSpatial/milestones/2.0","labels_url":"https://api.github.com/repos/DotSpatial/DotSpatial/milestones/1/labels","id":1751198,"number":1,"title":"2.0","description":"","creator":{"login":"mogikanin","id":840681,"avatar_url":"https://avatars.githubusercontent.com/u/840681?v=3","gravatar_id":"","url":"https://api.github.com/users/mogikanin","html_url":"https://github.com/mogikanin","followers_url":"https://api.github.com/users/mogikanin/followers","following_url":"https://api.github.com/users/mogikanin/following{/other_user}","gists_url":"https://api.github.com/users/mogikanin/gists{/gist_id}","starred_url":"https://api.github.com/users/mogikanin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mogikanin/subscriptions","organizations_url":"https://api.github.com/users/mogikanin/orgs","repos_url":"https://api.github.com/users/mogikanin/repos","events_url":"https://api.github.com/users/mogikanin/events{/privacy}","received_events_url":"https://api.github.com/users/mogikanin/received_events","type":"User","site_admin":false},"open_issues":9,"closed_issues":15,"state":"open","created_at":"2016-05-06T09:43:31Z","updated_at":"2016-05-24T08:38:02Z","due_on":null,"closed_at":null},"comments":3,"created_at":"2016-05-06T09:41:17Z","updated_at":"2016-05-24T10:56:03Z","closed_at":null,"body":"**This issue was imported from [CodePlex](http://dotspatial.codeplex.com/workitem/22468)**\r\n\r\n**[illumenum](http://www.codeplex.com/site/users/view/illumenum)** wrote 2012-04-09 at 18:37\r\nUsing the following code with polygon and multipolygons, I'm seeing an extra 4 zero'ed bytes at the end of any WKB output. PostGIS doesn't care about them, but SQL Server sees this as invalid WKB. EG:\r\n\r\nYeilds:\r\n\r\n0x010300000001000000070000004...33BCC4B4000000000\r\n\r\nShould yeild:\r\n\r\n0x010300000001000000070000004...33BCC4B40\r\n\r\n<pre><code>\r\nShapefile shapefile = Shapefile.OpenFile(tempShpPath);\r\n\r\nforeach (var feature in shapefile.Features)\r\n{\r\nbyte[] wkb = feature.BasicGeometry.ToBinary();\r\nArray.Resize(ref wkb, wkb.Length - 4); //chop off the weird last 4 bytes\r\n//do something with the wkb\r\n}</code></pre>\r\n\r\n**[mudnug](http://www.codeplex.com/site/users/view/mudnug)** wrote 2012-04-10 at 22:01\r\nIt looks like that code was take from Net Topology Suite. Perhaps they have already posted an update."},"comment":{"url":"https://api.github.com/repos/DotSpatial/DotSpatial/issues/comments/221234730","html_url":"https://github.com/DotSpatial/DotSpatial/issues/475#issuecomment-221234730","issue_url":"https://api.github.com/repos/DotSpatial/DotSpatial/issues/475","id":221234730,"user":{"login":"mogikanin","id":840681,"avatar_url":"https://avatars.githubusercontent.com/u/840681?v=3","gravatar_id":"","url":"https://api.github.com/users/mogikanin","html_url":"https://github.com/mogikanin","followers_url":"https://api.github.com/users/mogikanin/followers","following_url":"https://api.github.com/users/mogikanin/following{/other_user}","gists_url":"https://api.github.com/users/mogikanin/gists{/gist_id}","starred_url":"https://api.github.com/users/mogikanin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mogikanin/subscriptions","organizations_url":"https://api.github.com/users/mogikanin/orgs","repos_url":"https://api.github.com/users/mogikanin/repos","events_url":"https://api.github.com/users/mogikanin/events{/privacy}","received_events_url":"https://api.github.com/users/mogikanin/received_events","type":"User","site_admin":false},"created_at":"2016-05-24T10:56:03Z","updated_at":"2016-05-24T10:56:03Z","body":"@jany-tenaj yes, good test. Only add Assert() to check last 4 bytes, and commit it into repo. And then we can close this and #499 as well."}}
{"actor":{"display_login":"mogikanin"}}