sasshapefilegeomapsas-visual-analytics

Separated by the Meridian polygons in geomaps SAS VA (SAS GRAPH)


I'm trying create custom maps to Russia in Visual Analytics. So, I've faced with a trouble of "separated region".
You can see a visualization of this problem by using Dal'nevostochnyy (DVFO) region from MAPSGFK library. enter image description here

I tried to fix the scatter by this code:

data mps.vaasia1;
set mps.vaasia1;
if LONG < 0 and isoalpha2="RU" then long=long+360 ; 
run;

And so I get this result (on picture imaged region Chukotka, but it dosen't matter):

enter image description here It's better then previous situation, but it's look like crutch.
I've try to combine this two polygons by using GREMOVE (also add paramether FUZZ), but result was as the same.

UPD:
I use this code to get coordinates:

data ch;
set mapsgfk.Russia;
where id ="RU-77" ;
if LONG LE 0 then  long=long+360 ; 
x=long ;
y = lat;
run;

enter image description here

So my question is:
How can I delete space between two separated regions?

Thx for your answers / comments.


Solution

  • Thanks @Jor for you post. Your answer pushed me to thought: "May be I can't merge two poligons because they don't have common points?". So, I saw task like this:

    1. Remove points between polygons (Red squares in picture below)
    2. Set edge's polygons dots coordinates equal (Blue arrows)

    enter image description here

    data ch
    /*Drop out dots with coord in red squares*/
    (where=(not(lat > 66 and lat <68 and long >179 and long<181) ));
    set mapsgfk.Russia;
    where id ="RU-77" ;
    
    if LONG LE 0 then  long=long+360 ; 
    
    /*Set coordinates of near edge's points the same*/
    if (long > 179.9 and long < 180.3) then do; 
        long =180;
        if (lat > 68.9 and lat < 69) then lat=68.97;
        if (lat > 65 and lat < 65.1) then lat=65;
        if (lat > 70.9 and lat < 71) then lat=70.95;
        if (lat > 71.5 and lat < 71.6) then lat=71.55;
    end;
    
    x=long ;
    y = lat;
    run;
    
    proc gremove data=ch out=ch;
    by id;
    id id1;
    run;
    
    
    proc gmap data=ch map=ch;
    id id;
    choro id/nolegend;
    run;
    quit;
    

    Result: enter image description here