uDIG
  1. uDIG
  2. UDIG-1899

Exporting a Shapefile as KML does not work

    Details

    • Type: Bug Bug
    • Status: Resolved Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: UDIG 1.3.1
    • Fix Version/s: UDIG 1.3.2
    • Component/s: application
    • Labels:
      None
    • Environment:
      Windows XP Java 6 Update 29 (build 1.6.0_29-b11)

      Description

      I am trying to create a KML file from shapefiles that detail all NOAA forecast zones. The files I am working with are available here:
      http://www.nws.noaa.gov/geodata/catalog/wsom/html/pubzone.htm

      Here are the steps that I am following:

      Step 1: I create a new project called "Public Forecast Zones"
      Step 2: Layer -> Add -> Files
      Step 3: Select the .shp file (z_23fe12.shp)
      Step 4: Shapefile regions are now loaded... in the "Table" pane at the bottom I can iterate through all the zones and they are highlighted on the map. I can see all the data (except for the LONG list of coordinates per zone) or search for named zones.
      Step 5: In the projects pane in the top left, I right click on the layer for the shapefile, and click "Export"
      Step 6: I click the "Export feature layer to kml" option and click next
      Step 7: I click the button with 3 periods "..." and supply a filename "test_zones.kml".
      Step 8: I click "Finish". A dialog box comes up that says "Exporting Map" with a scrolling progress bar. The window is shown for approximately 5 seconds (time this dialog box shows for is consistent), and then it closes without any notification.

      After following these steps, no KML files are ever generated. No errors are displayed, nothing confirms or denys that the file was created. I am suspect that something is going wrong, because I doubt the export would happen as quick as the "Exporting" dialog box appears for. The shapefiles I'm working with are about ~60mb, so it should not be a quick 1 second export... I can only assume.

      I have tried selecting an "empty" kml file (just a .txt file with it's extension changed). I have also tried saving a basic KML file from google earth, and having the "Save" operation work on that file... and nothing happens then.

      Attached is the logfile that the Help->Submit Issue... menu selection provided me.

      1. kml.patch
        1 kB
        Frank Gasdorf
      2. udig_logfile.txt
        123 kB
        Mat Gilbert

        Activity

        Hide
        Frank Gasdorf added a comment - - edited
        Thanks Mat,

        I can confirm your issue, I downloaded a file from the given url and could display is on map but export to kml failed.

        And here is the fix, the export was streamed IN-Memory and afterwards the file was written, but in this case the amount of data was to much to hold in memory.

        After the changes the export works smoothly ;) (around 150mb)

        @Andrea, could you please try the patch and confirm that it solves the issue
        Show
        Frank Gasdorf added a comment - - edited Thanks Mat, I can confirm your issue, I downloaded a file from the given url and could display is on map but export to kml failed. And here is the fix, the export was streamed IN-Memory and afterwards the file was written, but in this case the amount of data was to much to hold in memory. After the changes the export works smoothly ;) (around 150mb) @Andrea, could you please try the patch and confirm that it solves the issue
        Frank Gasdorf made changes -
        Field Original Value New Value
        Attachment kml.patch [ 59595 ]
        Hide
        Frank Gasdorf added a comment -
        Show
        Frank Gasdorf added a comment - created a Pull request : https://github.com/uDig/udig-platform/pull/111
        Hide
        Mat Gilbert added a comment -
        Frank,

        Thanks for your quick response! I just downloaded the installer from the uDig website yesterday, I'm not sure how to apply the .patch to my installed copy. Do I need to wait until the git pull request gets merged into the main branch of uDig or is there a way I can apply the patch to my local copy?
        Show
        Mat Gilbert added a comment - Frank, Thanks for your quick response! I just downloaded the installer from the uDig website yesterday, I'm not sure how to apply the .patch to my installed copy. Do I need to wait until the git pull request gets merged into the main branch of uDig or is there a way I can apply the patch to my local copy?
        Hide
        Frank Gasdorf added a comment -
        I guess you have to wait for a new release (1.3.2 or 1.3.2-SNAPSHOT at http://udig.refractions.net/download/unstable/). The pull request has been merged into master already (THX to Andrea).
        Show
        Frank Gasdorf added a comment - I guess you have to wait for a new release (1.3.2 or 1.3.2-SNAPSHOT at http://udig.refractions.net/download/unstable/) . The pull request has been merged into master already (THX to Andrea).
        Frank Gasdorf made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Assignee Frank Gasdorf [ fgdrf1976 ]
        Fix Version/s UDIG 1.3.2 [ 18235 ]
        Fix Version/s UDIG 1.3.1 [ 18149 ]
        Resolution Fixed [ 1 ]
        Hide
        Frank Gasdorf added a comment -
        Mat, if you have developing experiences you can clone the git repository (https://github.com/uDig/udig-platform) and create your own SNAPSHOT release.
        Show
        Frank Gasdorf added a comment - Mat, if you have developing experiences you can clone the git repository ( https://github.com/uDig/udig-platform ) and create your own SNAPSHOT release.

          People

          • Assignee:
            Frank Gasdorf
            Reporter:
            Mat Gilbert
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: